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.2.0 to 0.2.1

2

common.js

@@ -76,3 +76,3 @@ /*! (C) 2017 by Andrea Giammarchi */

module._nonce = el.getAttribute('nonce');
module.import(filename);
module.import(filename.split('/').pop());
}

@@ -79,0 +79,0 @@ return module;

/*! (C) 2017 by Andrea Giammarchi */
"object"==typeof module?module.constructor.prototype.import=function(e){var t=this;return new Promise(function(n){n(t.require(e))})}:!function e(t,n){var o=t._||n.getAttribute("data-main"),r={},u={filename:o,exports:r,import:function(t){for(var n,r=/^(?:[a-z]+:)?\/\//.test(t),u=r?t:o.slice(0,o.lastIndexOf("/")),c=r?0:t.length,i=0,l=0;i<c;l=i+1)if(i=t.indexOf("/",l),i<0)i=c,u+="/"+t.slice(l),/\.js$/i.test(u)||(u+=".js");else if(0===i)u="";else{for(n=l,l=i;l&&"."===t.charAt(l-1);)--l;switch(i-l){case 0:u+="/"+t.slice(n,i);break;case 1:break;case 2:u=u.slice(0,u.lastIndexOf("/"))}}return window.module._cache[u]||(window.module._cache[u]=new Promise(function(t,n){var o,r=new XMLHttpRequest,c=document.documentElement;r.open("GET",u,!0),r.onerror=n,r.onload=function(){o=document.createElement("script"),o.setAttribute("nonce",window.module._nonce),o.textContent="module.$(function(){var module="+e+'(arguments[0]),exports=module.exports;(function(){"use strict";'+r.responseText+"}.call(exports));return module.exports;}(module));",window.module._=u,window.module.$=t,setTimeout(function(){c.removeChild(o)},1),c.appendChild(o)},r.send(null)}))}};return window.module||(window.module=u,u._cache=Object.create(null),u._nonce=n.getAttribute("nonce"),u.import(o)),u}({_:null},document.getElementById("common-js"));
"object"==typeof module?module.constructor.prototype.import=function(e){var t=this;return new Promise(function(o){o(t.require(e))})}:!function e(t,o){var n=t._||o.getAttribute("data-main"),r={},i={filename:n,exports:r,import:function(t){for(var o,r=/^(?:[a-z]+:)?\/\//.test(t),i=r?t:n.slice(0,n.lastIndexOf("/")),u=r?0:t.length,c=0,l=0;c<u;l=c+1)if(c=t.indexOf("/",l),c<0)c=u,i+="/"+t.slice(l),/\.js$/i.test(i)||(i+=".js");else if(0===c)i="";else{for(o=l,l=c;l&&"."===t.charAt(l-1);)--l;switch(c-l){case 0:i+="/"+t.slice(o,c);break;case 1:break;case 2:i=i.slice(0,i.lastIndexOf("/"))}}return window.module._cache[i]||(window.module._cache[i]=new Promise(function(t,o){var n,r=new XMLHttpRequest,u=document.documentElement;r.open("GET",i,!0),r.onerror=o,r.onload=function(){n=document.createElement("script"),n.setAttribute("nonce",window.module._nonce),n.textContent="module.$(function(){var module="+e+'(arguments[0]),exports=module.exports;(function(){"use strict";'+r.responseText+"}.call(exports));return module.exports;}(module));",window.module._=i,window.module.$=t,setTimeout(function(){u.removeChild(n)},1),u.appendChild(n)},r.send(null)}))}};return window.module||(window.module=i,i._cache=Object.create(null),i._nonce=o.getAttribute("nonce"),i.import(n.split("/").pop())),i}({_:null},document.getElementById("common-js"));

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

3jWa/0zrsOLTNz9QGz+I65ziJDhbZHEpz8bU9aTzpzo=
FTHWDu7KPy4S2C3bjxmedwsI1Gqo0/PYKyuxIpcXJ/A=

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

W7c4j4zEZEdah15X4bKWg7k9shZr5rc2IfGO8ECYKPU=
Ls7otM28oXC9Dva5XkYqbOyDiDFixA3eHcxh2FEQMmU=
{
"name": "common-js",
"version": "0.2.0",
"version": "0.2.1",
"description": "module.exports and module.import for browsers too",

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

@@ -87,5 +87,5 @@ # CommonJS + module.import() [![build status](https://secure.travis-ci.org/WebReflection/common-js.svg)](http://travis-ci.org/WebReflection/common-js)

* **Is there a CDN I can use to test?**
There is always one for npm modules. [https://unpkg.com/common-js@latest](https://unpkg.com/common-js@0.2.0/common.min.js) should be already OK.
There is always one for npm modules. [https://unpkg.com/common-js@latest](https://unpkg.com/common-js@0.2.1/common.min.js) should be already OK.
* **Is this using eval?**
It's using a technique that is compatible with highest security measurements such [Content Security Policy](https://w3c.github.io/webappsec-csp/)
No. It's using a technique that is even compatible with highest security standards such [Content Security Policy](https://w3c.github.io/webappsec-csp/)

@@ -92,0 +92,0 @@

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