Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'testLib/strictModule.js')
-rw-r--r--testLib/strictModule.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/testLib/strictModule.js b/testLib/strictModule.js
new file mode 100644
index 0000000..5d6e387
--- /dev/null
+++ b/testLib/strictModule.js
@@ -0,0 +1,7 @@
+"use strict"; // run code in ES5 strict mode
+
+function doSomethingUnstrict() {
+ var caller = arguments.callee.caller; // this should throw an error as a proof that strict mode is on
+}
+
+exports.doSomethingUnstrict = doSomethingUnstrict; \ No newline at end of file