Comparing version 0.1.0 to 0.1.1
@@ -47,6 +47,2 @@ /*! (C) 2017 by Andrea Giammarchi */ | ||
xhr.onload = function () { | ||
alert('var module=' + CommonJS + '(arguments[0]),' + | ||
'exports=module.exports;(function(){"use strict";' + | ||
xhr.responseText + | ||
'}.call(exports));return module.exports;'); | ||
resolve(Function( | ||
@@ -53,0 +49,0 @@ 'var module=' + CommonJS + '(arguments[0]),' + |
/*! (C) 2017 by Andrea Giammarchi */ | ||
"object"==typeof module?module.constructor.prototype.import=function(e){var t=this;return new Promise(function(o){o(t.require(e))})}:!function e(t){var o={},r={filename:t,exports:o,import:function(o){for(var r,n=/^(?:[a-z]+:)?\/\//.test(o),s=n?o:t.slice(0,t.lastIndexOf("/")),u=n?0:o.length,c=0,i=0;c<u;i=c+1)if(c=o.indexOf("/",i),c<0)c=u,s+="/"+o.slice(i),/\.js$/i.test(s)||(s+=".js");else if(0===c)s="";else{for(r=i,i=c;i&&"."===o.charAt(i-1);)--i;switch(c-i){case 0:s+="/"+o.slice(r,c);break;case 1:break;case 2:s=s.slice(0,s.lastIndexOf("/"))}}return window.module._cache[s]||(window.module._cache[s]=new Promise(function(t,o){var r=new XMLHttpRequest;r.open("GET",s,!0),r.onerror=o,r.onload=function(){alert("var module="+e+'(arguments[0]),exports=module.exports;(function(){"use strict";'+r.responseText+"}.call(exports));return module.exports;"),t(Function("var module="+e+'(arguments[0]),exports=module.exports;(function(){"use strict";'+r.responseText+"}.call(exports));return module.exports;")(s))},r.send(null)}))}};return window.module||(window.module=r,r._cache=Object.create(null),r.import(t)),r}(document.getElementById("common-js").getAttribute("data-main")); | ||
"object"==typeof module?module.constructor.prototype.import=function(e){var t=this;return new Promise(function(o){o(t.require(e))})}:!function e(t){var o={},n={filename:t,exports:o,import:function(o){for(var n,r=/^(?:[a-z]+:)?\/\//.test(o),s=r?o:t.slice(0,t.lastIndexOf("/")),c=r?0:o.length,i=0,u=0;i<c;u=i+1)if(i=o.indexOf("/",u),i<0)i=c,s+="/"+o.slice(u),/\.js$/i.test(s)||(s+=".js");else if(0===i)s="";else{for(n=u,u=i;u&&"."===o.charAt(u-1);)--u;switch(i-u){case 0:s+="/"+o.slice(n,i);break;case 1:break;case 2:s=s.slice(0,s.lastIndexOf("/"))}}return window.module._cache[s]||(window.module._cache[s]=new Promise(function(t,o){var n=new XMLHttpRequest;n.open("GET",s,!0),n.onerror=o,n.onload=function(){t(Function("var module="+e+'(arguments[0]),exports=module.exports;(function(){"use strict";'+n.responseText+"}.call(exports));return module.exports;")(s))},n.send(null)}))}};return window.module||(window.module=n,n._cache=Object.create(null),n.import(t)),n}(document.getElementById("common-js").getAttribute("data-main")); |
{ | ||
"name": "common-js", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "module.exports and module.import for browsers too", | ||
@@ -5,0 +5,0 @@ "main": "common.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7907
66