File: strictModule.js

package info (click to toggle)
node-rewire 6.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 392 kB
  • sloc: javascript: 1,386; makefile: 2
file content (7 lines) | stat: -rw-r--r-- 240 bytes parent folder | download
1
2
3
4
5
6
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;