From 0c860734dc28a679d9214ee9c5b5ff95e00eed55 Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 21 Jun 2012 00:24:09 +0200 Subject: removed "use strict"; to avoid influencing not-strict modules --- lib/__set__.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/__set__.js') 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") { -- cgit v1.2.3