{"versions":{"0.3.8":{"name":"common-js","version":"0.3.8","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --support-ie8 --comments=/^!/ --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"72d8faf7d6430ce9aafbc32d3dab32f647f6edad","_id":"common-js@0.3.8","_shasum":"f4328918b4ba376f981ad33a1b1fbb6614126ecb","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.5.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"f4328918b4ba376f981ad33a1b1fbb6614126ecb","size":5640,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.8.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.3.8.tgz_1486919881024_0.9186312418896705"},"directories":{},"publish_time":1486919881705,"_cnpm_publish_time":1486919881705,"_hasShrinkwrap":false,"contributors":[]},"0.3.6":{"name":"common-js","version":"0.3.6","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --support-ie8 --comments=/^!/ --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"aa4525f7a1575f6e57da7930fc4f1069fc727f59","_id":"common-js@0.3.6","_shasum":"e061da3aa3f83a10024f9ddd2a81e3756a49ba05","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"e061da3aa3f83a10024f9ddd2a81e3756a49ba05","size":5952,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.6.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.3.6.tgz_1486303664767_0.09036573907360435"},"directories":{},"publish_time":1486303665478,"_cnpm_publish_time":1486303665478,"_hasShrinkwrap":false,"contributors":[]},"0.3.5":{"name":"common-js","version":"0.3.5","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --support-ie8 --comments=/^!/ --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"5a01fe8de699e72939ce9c0b1ad7bf73b696f7b7","_id":"common-js@0.3.5","_shasum":"d135a968a1afa7ea371910a7ffb742870036d1ef","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"d135a968a1afa7ea371910a7ffb742870036d1ef","size":5950,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.5.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.3.5.tgz_1485634148942_0.8200676215346903"},"directories":{},"publish_time":1485634149593,"_cnpm_publish_time":1485634149593,"_hasShrinkwrap":false,"contributors":[]},"0.3.3":{"name":"common-js","version":"0.3.3","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=/^!/ --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"d3e783b6f898e65de7377c46675f6dd6560a44e4","_id":"common-js@0.3.3","_shasum":"9314f75d1568c08216bda8825d3d790b37cb6cff","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"9314f75d1568c08216bda8825d3d790b37cb6cff","size":4896,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.3.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.3.3.tgz_1485010957774_0.8347147998865694"},"directories":{},"publish_time":1485010958307,"_cnpm_publish_time":1485010958307,"_hasShrinkwrap":false,"contributors":[]},"0.3.2":{"name":"common-js","version":"0.3.2","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=/^!/ --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"fed6ada17d0c449dc10b3af19a42434aa1ba031c","_id":"common-js@0.3.2","_shasum":"0aac0fa33abf9ab178d69fa7444fcfaf91c16ab6","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"0aac0fa33abf9ab178d69fa7444fcfaf91c16ab6","size":4872,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.2.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/common-js-0.3.2.tgz_1485010651125_0.6885749800130725"},"directories":{},"publish_time":1485010653228,"_cnpm_publish_time":1485010653228,"_hasShrinkwrap":false,"contributors":[]},"0.3.1":{"name":"common-js","version":"0.3.1","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=/^!/ --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"da4deb0ade3f0c8677c7bada14d68bfb2a2b7a2d","_id":"common-js@0.3.1","_shasum":"14f4350ceba01b191d0b08221a1dd6d80c9cc350","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"14f4350ceba01b191d0b08221a1dd6d80c9cc350","size":4659,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.1.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.3.1.tgz_1484993558001_0.5548988045193255"},"directories":{},"publish_time":1484993558561,"_cnpm_publish_time":1484993558561,"_hasShrinkwrap":false,"contributors":[]},"0.3.0":{"name":"common-js","version":"0.3.0","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=all --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"944aeb9dc090e00f45a5eb8e50caddcd8e658436","_id":"common-js@0.3.0","_shasum":"127ba88c4828fd776ca259846a6859f73893cd9d","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"127ba88c4828fd776ca259846a6859f73893cd9d","size":4610,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.3.0.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.3.0.tgz_1484990425009_0.5808686939999461"},"directories":{},"publish_time":1484990425528,"_cnpm_publish_time":1484990425528,"_hasShrinkwrap":false,"contributors":[]},"0.2.1":{"name":"common-js","version":"0.2.1","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=all --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"1bcb744cb6029dbbc629469b1255fd96d4803538","_id":"common-js@0.2.1","_shasum":"6d167d0e8f44081001ffec2a40279e70ba7018c2","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"6d167d0e8f44081001ffec2a40279e70ba7018c2","size":4190,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.2.1.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.2.1.tgz_1484956974529_0.8548803029116243"},"directories":{},"publish_time":1484956975276,"_cnpm_publish_time":1484956975276,"_hasShrinkwrap":false,"contributors":[]},"0.2.0":{"name":"common-js","version":"0.2.0","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","build":"npm run minify; npm run nonce; npm run size;","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=all --compress --mangle -o common.min.js","nonce":"cat common.js | openssl dgst -sha256 -binary | base64 > nonce.txt;cat common.min.js | openssl dgst -sha256 -binary | base64 > nonce.min.txt"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"1a5053b1b49e42134e75d93d605f4bd65f636f87","_id":"common-js@0.2.0","_shasum":"97b38fdea375338601067ed22d956a66db2d7520","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"97b38fdea375338601067ed22d956a66db2d7520","size":4171,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.2.0.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.2.0.tgz_1484956114749_0.6609012519475073"},"directories":{},"publish_time":1484956115438,"_cnpm_publish_time":1484956115438,"_hasShrinkwrap":false,"contributors":[]},"0.1.1":{"name":"common-js","version":"0.1.1","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=all --compress --mangle -o common.min.js"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"dcecd66bf5727e7dd0da172f822c8a1ec88da814","_id":"common-js@0.1.1","_shasum":"225e939a26dc84e781f32d8afd8cbe272e032f49","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"225e939a26dc84e781f32d8afd8cbe272e032f49","size":3636,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.1.1.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.1.1.tgz_1484948730434_0.38395281112752855"},"directories":{},"publish_time":1484948731113,"_cnpm_publish_time":1484948731113,"_hasShrinkwrap":false,"contributors":[]},"0.1.0":{"name":"common-js","version":"0.1.0","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"node test.js","size":"cat common.js | wc -c;cat common.min.js | wc -c;gzip -c common.min.js | wc -c","minify":"uglifyjs common.js --comments=all --compress --mangle -o common.min.js"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","devDependencies":{"uglify-js":"^2.7.5"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/common-js.git"},"bugs":{"url":"https://github.com/WebReflection/common-js/issues"},"homepage":"https://github.com/WebReflection/common-js#readme","gitHead":"d5c3f8b5e9670eaae9fcfb426fedc8541c3ebb83","_id":"common-js@0.1.0","_shasum":"5dc0e146dd7cb2d5b8a08752b40b00120dc8a2b8","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"5dc0e146dd7cb2d5b8a08752b40b00120dc8a2b8","size":3650,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.1.0.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/common-js-0.1.0.tgz_1484948655450_0.053033182164654136"},"directories":{},"publish_time":1484948657231,"_cnpm_publish_time":1484948657231,"_hasShrinkwrap":false,"contributors":[]},"0.0.0":{"name":"common-js","version":"0.0.0","description":"module.exports and module.import for browsers too","main":"common.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["require","module","exports","import","async","browser"],"author":{"name":"Andrea Giammarchi"},"license":"MIT","_id":"common-js@0.0.0","_shasum":"ca598e179794786e796447ba4cedec96a28ae1e2","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.4.0","_npmUser":{"name":"anonymous","email":"andrea.giammarchi@gmail.com"},"dist":{"shasum":"ca598e179794786e796447ba4cedec96a28ae1e2","size":1703,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/common-js/-/common-js-0.0.0.tgz"},"maintainers":[{"name":"anonymous","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/common-js-0.0.0.tgz_1484943431064_0.6212551635690033"},"directories":{},"publish_time":1484943431750,"_cnpm_publish_time":1484943431750,"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"0.3.8"},"name":"common-js","time":{"modified":"2022-01-26T16:36:50.440Z","created":"2022-01-26T16:36:50.440Z","0.3.8":"2017-02-12T17:18:01.705Z","0.3.6":"2017-02-05T14:07:45.478Z","0.3.5":"2017-01-28T20:09:09.593Z","0.3.3":"2017-01-21T15:02:38.307Z","0.3.2":"2017-01-21T14:57:33.228Z","0.3.1":"2017-01-21T10:12:38.561Z","0.3.0":"2017-01-21T09:20:25.528Z","0.2.1":"2017-01-21T00:02:55.276Z","0.2.0":"2017-01-20T23:48:35.438Z","0.1.1":"2017-01-20T21:45:31.113Z","0.1.0":"2017-01-20T21:44:17.231Z","0.0.0":"2017-01-20T20:17:11.750Z"},"readme":"# CommonJS + module.import() [![build status](https://secure.travis-ci.org/WebReflection/common-js.svg)](http://travis-ci.org/WebReflection/common-js)\n\nThis module aim is to bring both CommonJS like module behavior on Web browsers,\nand a promise based `module.import(path)` to both browsers and NodeJS.\n\n<sub>Yes, it resolves paths relatively to the current one!<sub>\n\n<sub>Yes, it is secure too, check the [CSP enabled page](https://webreflection.github.io/common-js/csp.html)!<sub>\n\nDon't miss [the introductory blog post](https://medium.com/@WebReflection/asynchronous-module-import-path-b9f56675e109#.8nsdv9571) about this idea!\n\n\n### Browser Example\n```html\n<!doctype html>\n<html>\n  <script\n    id=\"common-js\"\n    data-main=\"/js-browser/main.js\"\n    src=\"common.js\"\n  ></script>\n</html>\n```\n\nHaving a single script with `id=\"common-js\"` is all it takes to be able to load asynchronously any other file or module.\n\nThe main entry point `/js-browser/main.js` will resolve relative paths from `/js-browser/` folder.\n\nIts loaded modules will resolve their own imported paths from where they've been loaded, and so on.\nThe same goes for NodeJS, it's indeed same logic behind `require`.\n\n```js\n// /js-browser/main.js loading /js-browser/test.js\nmodule.import('./test').then(function (test) {\n  test('Hello CommonJS!');\n  // will output:\n  // Hello CommonJS!\n  // from /js-browser/test.js\n});\n\n// the /js-browser/test.js content\nmodule.exports = function (message) {\n  alert(message + '\\nfrom ' + module.filename);\n};\n```\n\n\n\n### Load multiple modules at once\n```js\nPromise.all([\n  module.import('./a'),\n  module.import('//cdn.something.com/cool.js'),\n  module.import('../sw.js'),\n  module.import('/root/too.js')\n]).then(function (modules) {\n  const [a, cool, sw, too] = modules;\n});\n```\n\n\n### Exporting modules asynchronously\n```js\n// an async example of /js-browser/test.js content\n// for the /js-browser/main.js file nothing changes\nmodule.exports = new Promise(function (resolve) {\n  setTimeout(\n    resolve,\n    1000,\n    function (message) {\n      alert(message + '\\nfrom ' + module.filename);\n    }\n  );\n});\n```\n\n\n\n### Compatibility\nYou can test your target directly through the [live test page](https://webreflection.github.io/common-js/).\nWhat I could test was the following:\n\n**Mobile** Android 2+, iOS5+, WP7+, BBOS7+, FFOS1+, WebOS2+, Kindle Paper & Fire\n\n**Desktop** Chrome, FF, Safari, Opera, IE9+ (theoretically IE8 too but it needs few polyfills upfront)\n\n\n\n\n### What else?\nThe synchronous `require` and both `__filename` and `__dirname` are also exposed, but nothing else from NodeJS core is available.\nYou are responsible for loading all the modules you need, possibly only when you need them.\n\n\n\n### F.A.Q\n\n  * **Does it load every time?**\n    It uses a cache, like NodeJS does. If you load same module twice, even from different relative paths, it'll use the cached one.\n  * **Why on the module?**\n    There are scripts, script type module, `importScripts`, a [dynamic import proposal](https://github.com/tc39/proposal-dynamic-import#import), you name it ... this one actually works and it's backward compatible with modules that don't care about this solution existing.\n  * **Why not ES2015 modules?**\n    Because those, so far, never truly solved anything. Actually, ES6 modules created more problems due inability to require modules at runtime and/or on the browser.\n  * **Is there a CDN I can use to test?**\n    There is always one for npm modules. [https://unpkg.com/common-js@latest](https://unpkg.com/common-js@latest/common.min.js) should be already OK.\n  * **Is this using eval?**\n    No. It's using a technique that is even compatible with highest security standards such [Content Security Policy](https://w3c.github.io/webappsec-csp/)\n\n\n\n### License\nCopyright (C) 2017 by Andrea Giammarchi - @WebReflection","users":{}}