Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

common-js

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-js - npm Package Compare versions

Comparing version 0.3.6 to 0.3.8

13

common.js

@@ -12,10 +12,11 @@ /*! (C) 2017 Andrea Giammarchi */

var
protoPath = /^(?:[a-z]+:)?\/\//,
npmPath = /^[a-zA-Z_-]/,
__filename = info._ || el.getAttribute('data-main').replace(npmPath, './$&'),
normalize = function (url) {
if (npmPath.test(url)) url = gModule._path(url);
if (protoPath.test(url)) return url;
if (npmPath.test(url)) return gModule._path(url);
for (var
abs = /^(?:[a-z]+:)?\/\//.test(url),
path = abs ? url : __filename.slice(0, __filename.lastIndexOf('/')),
length = abs ? 0 : url.length,
path = __filename.slice(0, __filename.lastIndexOf('/')),
length = url.length,
c, i = 0, p = 0; i < length; p = i + 1

@@ -55,4 +56,4 @@ ) {

xhr.responseText +
';\n}.call(exports));return module.exports;'
+ '}(module));';
';\n}.call(exports));return module.exports;' +
'}(module));';
gModule._ = path;

@@ -59,0 +60,0 @@ gModule.$ = function (exports) {

/*! (C) 2017 Andrea Giammarchi */
"object"==typeof module?"import"in module||(module.constructor.prototype["import"]=function(e){var t=this;return Promise.resolve().then(function(){return t.require(e)})}):!function e(t,n){var r=/^[a-zA-Z_-]/,o=t._||n.getAttribute("data-main").replace(r,"./$&"),s=function(e){r.test(e)&&(e=m._path(e));for(var t,n=/^(?:[a-z]+:)?\/\//.test(e),s=n?e:o.slice(0,o.lastIndexOf("/")),i=n?0:e.length,u=0,c=0;u<i;c=u+1)if(u=e.indexOf("/",c),u<0)u=i,s+="/"+e.slice(c),/\.js$/i.test(s)||(s+=".js");else if(0===u)s="";else{for(t=c,c=u;c&&"."===e.charAt(c-1);)--c;switch(u-c){case 0:s+="/"+e.slice(t,u);break;case 1:break;case 2:s=s.slice(0,s.lastIndexOf("/"))}}return s},i=function(e,t,n){var r=document.documentElement,o=document.createElement("script");o.setAttribute("nonce",m._nonce),o.textContent="module.$(function(){var module="+m._cjs+'(arguments[0]),__filename=module.filename,__dirname=__filename.slice(0,__filename.lastIndexOf("/")),require=module.require,exports=module.exports;(function(){"use strict";\n'+e.responseText+";\n}.call(exports));return module.exports;}(module));",m._=t,m.$=function(e){n(m._cache[t]=e)},setTimeout(function(){r.removeChild(o)},1),r.appendChild(o)},u=function(e,t){throw m._cache[e]=new Error(t.statusText)},c=function(e){var t,n=e,r=/^((?:[a-z]+?:\/\/)?[^\/]+)\/([^@]+)@latest(\/.*)?$/.exec(e),o=function(e){t=e},s=new XMLHttpRequest;if(r){if(s.open("GET","http://www.3site.eu/latest/?@="+r[2],!1),s.send(null),!(s.status<400))return u(e,s);t=JSON.parse(s.responseText),n=r[1]+"/"+r[2]+"@"+t.version+(r[3]||"")}return s=new XMLHttpRequest,s.open("GET",n,!1),s.send(t=null),s.status<400?i(s,e,o):u(e,s),t},a={},l={filename:o,exports:a,require:function(e){var t=s(e);return m._cache[t]||c(t)},"import":function(e){var t=s(e);return Promise.resolve(m._cache[t]||(m._cache[t]=new Promise(function(e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400?i(r,t,e):n(new Error(r.statusText)))},r.send(null)})))}},m=window.module||l;return m===l&&(window.global=window,window.module=l,window.process={browser:!0},l._cache=Object.create(null),l._nonce=n.getAttribute("nonce"),l._cjs=""+e,l._path=function(e){var t=e.indexOf("/"),n=e.length;return"https://unpkg.com/"+e.slice(0,t<0?n:t)+"@latest"+(t<0?"":e.slice(t))},l["import"]("./"+o.split("/").pop())),l}({_:""},document.getElementById("common-js"));
"object"==typeof module?"import"in module||(module.constructor.prototype["import"]=function(e){var t=this;return Promise.resolve().then(function(){return t.require(e)})}):!function e(t,n){var r=/^(?:[a-z]+:)?\/\//,o=/^[a-zA-Z_-]/,s=t._||n.getAttribute("data-main").replace(o,"./$&"),i=function(e){if(r.test(e))return e;if(o.test(e))return d._path(e);for(var t,n=s.slice(0,s.lastIndexOf("/")),i=e.length,u=0,c=0;u<i;c=u+1)if(u=e.indexOf("/",c),u<0)u=i,n+="/"+e.slice(c),/\.js$/i.test(n)||(n+=".js");else if(0===u)n="";else{for(t=c,c=u;c&&"."===e.charAt(c-1);)--c;switch(u-c){case 0:n+="/"+e.slice(t,u);break;case 1:break;case 2:n=n.slice(0,n.lastIndexOf("/"))}}return n},u=function(e,t,n){var r=document.documentElement,o=document.createElement("script");o.setAttribute("nonce",d._nonce),o.textContent="module.$(function(){var module="+d._cjs+'(arguments[0]),__filename=module.filename,__dirname=__filename.slice(0,__filename.lastIndexOf("/")),require=module.require,exports=module.exports;(function(){"use strict";\n'+e.responseText+";\n}.call(exports));return module.exports;}(module));",d._=t,d.$=function(e){n(d._cache[t]=e)},setTimeout(function(){r.removeChild(o)},1),r.appendChild(o)},c=function(e,t){throw d._cache[e]=new Error(t.statusText)},a=function(e){var t,n=e,r=/^((?:[a-z]+?:\/\/)?[^\/]+)\/([^@]+)@latest(\/.*)?$/.exec(e),o=function(e){t=e},s=new XMLHttpRequest;if(r){if(s.open("GET","http://www.3site.eu/latest/?@="+r[2],!1),s.send(null),!(s.status<400))return c(e,s);t=JSON.parse(s.responseText),n=r[1]+"/"+r[2]+"@"+t.version+(r[3]||"")}return s=new XMLHttpRequest,s.open("GET",n,!1),s.send(t=null),s.status<400?u(s,e,o):c(e,s),t},l={},m={filename:s,exports:l,require:function(e){var t=i(e);return d._cache[t]||a(t)},"import":function(e){var t=i(e);return Promise.resolve(d._cache[t]||(d._cache[t]=new Promise(function(e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400?u(r,t,e):n(new Error(r.statusText)))},r.send(null)})))}},d=window.module||m;return d===m&&(window.global=window,window.module=m,window.process={browser:!0},m._cache=Object.create(null),m._nonce=n.getAttribute("nonce"),m._cjs=""+e,m._path=function(e){var t=e.indexOf("/"),n=e.length;return"https://unpkg.com/"+e.slice(0,t<0?n:t)+"@latest"+(t<0?"":e.slice(t))},m["import"]("./"+s.split("/").pop())),m}({_:""},document.getElementById("common-js"));

@@ -1,1 +0,1 @@

7giZujfBiq/Hh0AVAcH299goQUbkoEEOxF8XPkgmlEc=
eI26oJgDsppcOcjfcysbVOvOTFhz9afQG64Cf4KInwg=

@@ -1,1 +0,1 @@

NN2EkKKBrjsqvNYMr/Jca6WMpVbz++M4PV8VIAp149o=
jA7XtV4Pehdob0C3lDoGSD1hM8KB+naQdoMNZxf7cMs=
{
"name": "common-js",
"version": "0.3.6",
"version": "0.3.8",
"description": "module.exports and module.import for browsers too",

@@ -5,0 +5,0 @@ "main": "common.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc