require-kiss
Advanced tools
Comparing version 1.0.3 to 1.0.5
{ | ||
"name": "require-kiss", | ||
"description": "Abstracts module.exports for ssjs/browserjs compatibility", | ||
"version": "1.0.3", | ||
"version": "1.0.5", | ||
"homepage": "https://github.com/coolaj86/require-kiss-js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -11,3 +11,3 @@ /*jslint onevar: true, undef: true, newcap: true, regexp: true, plusplus: true, bitwise: true, devel: true, maxerr: 50, indent: 2 */ | ||
function ssjsProvide(exports) { | ||
module.parent.module.exports = exports || module.exports; | ||
//module.exports = exports || module.exports; | ||
} | ||
@@ -29,3 +29,3 @@ | ||
function browserRequire(name) { | ||
var module, | ||
var mod, | ||
msg = "One of the included scripts requires '" + | ||
@@ -36,5 +36,5 @@ name + "', which is not loaded. " + | ||
name = normalize(name); | ||
module = global.__REQUIRE_KISS_EXPORTS[name] || global[name]; | ||
mod = global.__REQUIRE_KISS_EXPORTS[name] || global[name]; | ||
if ('undefined' === typeof module && !thrownAlready) { | ||
if ('undefined' === typeof mod && !thrownAlready) { | ||
thrownAlready = true; | ||
@@ -45,3 +45,3 @@ alert(msg); | ||
return module; | ||
return mod; | ||
} | ||
@@ -48,0 +48,0 @@ |
3111