diff options
author | Johannes <johannes.ewald@roomieplanet.de> | 2012-06-21 02:24:09 +0400 |
---|---|---|
committer | Johannes <johannes.ewald@roomieplanet.de> | 2012-06-21 02:24:09 +0400 |
commit | 0c860734dc28a679d9214ee9c5b5ff95e00eed55 (patch) | |
tree | 2b76efd42c12f331b79e61fb88ac480119d971c3 /lib/__set__.js | |
parent | ce972e2b1a9a43f6c19a68a5701b1b3b1bcc67f8 (diff) |
removed "use strict"; to avoid influencing not-strict modules
Diffstat (limited to 'lib/__set__.js')
-rw-r--r-- | lib/__set__.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/__set__.js b/lib/__set__.js index 219b381..49e4494 100644 --- a/lib/__set__.js +++ b/lib/__set__.js @@ -1,5 +1,3 @@ -"use strict"; // run code in ES5 strict mode
-
/**
* This function will be stringified and then injected into every rewired module.
* Then you can set private variables by calling myModule.__set__("myPrivateVar", newValue);
@@ -17,7 +15,7 @@ module.exports = function __set__() { arguments.varValue = arguments[1];
arguments.src = "";
arguments.checkExistsSrc = function (varName) {
- return "if (typeof " + varName + " === 'undefined') { throw new ReferenceError('" + varName + " is not defined');} ";
+ return "if (typeof " + varName + " === 'undefined') { throw new ReferenceError('Cannot __set__(): " + varName + " is not declared within the module.');} ";
};
if (typeof arguments[0] === "object") {
|