{"_id":"load-script","_rev":"1137990","name":"load-script","description":"Dynamic script loading for browser","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"time":{"modified":"2021-10-06T20:36:02.000Z","created":"2013-05-29T00:08:48.399Z","2.0.0":"2021-10-06T20:35:35.646Z","1.0.0":"2015-03-08T20:36:48.095Z","0.0.5":"2014-03-21T01:44:28.017Z","0.0.4":"2013-12-31T01:13:33.679Z","0.0.3":"2013-12-28T16:17:27.176Z","0.0.2":"2013-05-29T00:08:48.399Z"},"users":{"actionwolf":true,"wenbing":true,"niubenjs":true,"jovinbm":true,"bassettsj":true,"wen911119":true,"sternelee":true,"zuojiang":true},"repository":{"type":"git","url":"git://github.com/eldargab/load-script.git"},"versions":{"2.0.0":{"name":"load-script","description":"Dynamic script loading for browser","version":"2.0.0","types":"./index.d.ts","keywords":["browser","script","load"],"repository":{"type":"git","url":"git://github.com/eldargab/load-script.git"},"scripts":{"test":"zuul -- test/index.js","test-local":"zuul --local 9005 -- test/index.js"},"devDependencies":{"zuul":"~2.1.0"},"license":"MIT","gitHead":"a282a018699997b89cf24ab0d1fe1f7b99dab612","bugs":{"url":"https://github.com/eldargab/load-script/issues"},"homepage":"https://github.com/eldargab/load-script#readme","_id":"load-script@2.0.0","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"shasum":"40821aaa59e9bbe7be2e28b6ab053e6f44330fa1","size":2691,"noattachment":false,"key":"/load-script/-/load-script-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/load-script/download/load-script-2.0.0.tgz"},"_npmUser":{"name":"eldar","email":"eldargab@gmail.com"},"directories":{},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/load-script_2.0.0_1633552535503_0.963853819115956"},"_hasShrinkwrap":false,"publish_time":1633552535646,"_cnpm_publish_time":1633552535646},"1.0.0":{"name":"load-script","description":"Dynamic script loading for browser","version":"1.0.0","keywords":["browser","script","load"],"repository":{"type":"git","url":"git://github.com/eldargab/load-script"},"scripts":{"test":"zuul -- test/index.js","test-local":"zuul --local 9005 -- test/index.js"},"devDependencies":{"zuul":"~2.1.0"},"license":"MIT","gitHead":"09f6c1002c3bc48e8ab3027ad42260228b5dd0db","bugs":{"url":"https://github.com/eldargab/load-script/issues"},"homepage":"https://github.com/eldargab/load-script","_id":"load-script@1.0.0","_shasum":"0491939e0bee5643ee494a7e3da3d2bac70c6ca4","_from":".","_npmVersion":"2.6.1","_nodeVersion":"0.10.35","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"dist":{"shasum":"0491939e0bee5643ee494a7e3da3d2bac70c6ca4","size":2603,"noattachment":false,"key":"/load-script/-/load-script-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/load-script/download/load-script-1.0.0.tgz"},"directories":{},"publish_time":1425847008095,"_cnpm_publish_time":1425847008095,"_hasShrinkwrap":false},"0.0.5":{"name":"load-script","description":"Dynamic script loading for browser","version":"0.0.5","keywords":["browser","script","load"],"repository":{"type":"git","url":"git://github.com/eldargab/load-script"},"scripts":{"test":"zuul -- test/index.js","test-local":"zuul --local 9005 -- test/index.js"},"devDependencies":{"zuul":"~1.5.4"},"license":"MIT","bugs":{"url":"https://github.com/eldargab/load-script/issues"},"homepage":"https://github.com/eldargab/load-script","_id":"load-script@0.0.5","dist":{"shasum":"cbd54b27cd7309902b749640c70e996f4c643b63","size":1887,"noattachment":false,"key":"/load-script/-/load-script-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/load-script/download/load-script-0.0.5.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"directories":{},"publish_time":1395366268017,"_cnpm_publish_time":1395366268017,"_hasShrinkwrap":false},"0.0.4":{"name":"load-script","description":"Dynamic script loading for browser","version":"0.0.4","keywords":["browser","script","load"],"repository":{"type":"git","url":"git://github.com/eldargab/load-script"},"license":"MIT","component":{"scripts":{"load-script/index.js":"index.js"}},"readmeFilename":"Readme.md","bugs":{"url":"https://github.com/eldargab/load-script/issues"},"homepage":"https://github.com/eldargab/load-script","_id":"load-script@0.0.4","dist":{"shasum":"659bad9d950d660c09041784b542cd27a3f0af5d","size":1827,"noattachment":false,"key":"/load-script/-/load-script-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/load-script/download/load-script-0.0.4.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"directories":{},"publish_time":1388452413679,"_cnpm_publish_time":1388452413679,"_hasShrinkwrap":false},"0.0.3":{"name":"load-script","description":"Dynamic script loading for browser","version":"0.0.3","keywords":["browser","script","load"],"repository":{"type":"git","url":"git://github.com/eldargab/load-script"},"license":"MIT","component":{"scripts":{"load-script/index.js":"index.js"}},"readmeFilename":"Readme.md","bugs":{"url":"https://github.com/eldargab/load-script/issues"},"homepage":"https://github.com/eldargab/load-script","_id":"load-script@0.0.3","dist":{"shasum":"0663aa1e0bd770bf317e6d7af58e6cdf48de5774","size":1544,"noattachment":false,"key":"/load-script/-/load-script-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/load-script/download/load-script-0.0.3.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"directories":{},"publish_time":1388247447176,"_cnpm_publish_time":1388247447176,"_hasShrinkwrap":false},"0.0.2":{"name":"load-script","description":"Dynamic script loading","version":"0.0.2","keywords":["script","load"],"license":"MIT","component":{"scripts":{"load-script/index.js":"index.js"}},"readmeFilename":"Readme.md","_id":"load-script@0.0.2","dist":{"shasum":"81d771718ac6c56e4f7733178550ab29f972c201","size":1454,"noattachment":false,"key":"/load-script/-/load-script-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/load-script/download/load-script-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"eldar","email":"eldargab@gmail.com"}],"directories":{},"publish_time":1369786128399,"_cnpm_publish_time":1369786128399,"_hasShrinkwrap":false}},"readme":"# load-script\n\nDynamic script loading.\n\n## Installation\n\nvia component\n\n```\n$ component install eldargab/load-script\n```\n\nvia npm\n\n```\n$ npm install load-script\n```\n\n## API\n`load-script` appends a `script` node to the `<head>` element in the dom.\n\n`require('load-script')` returns a function of the following interface:  `function(url[, opts][, cb]) {}`\n\n### url\nAny url that you would like to load.  May be absolute or relative.\n\n### [, opts]\nA map of options.  Here are the currently supported options:\n\n* `async` - A boolean value used for `script.async`.  By default this is `true`.\n* `attrs` - A map of attributes to set on the `script` node before appending it to the DOM.  By default this is empty.\n* `charset` - A string value used for `script.charset`.  By default this is `utf8`.\n* `text` - A string of text to append to the `script` node before it is appended to the DOM.  By default this is empty.\n* `type` - A string used for `script.type`.  By default this is `text/javascript`.\n\n### [, cb]\nA callback function of the following interface: `function(err, script) {}` where `err` is an error if any occurred and `script` is the `script` node that was appended to the DOM.\n\n## Example Usage\n\n```javascript\nvar load = require('load-script')\n\nload('foo.js', function (err, script) {\n  if (err) {\n    // print useful message\n  }\n  else {\n    console.log(script.src);// Prints 'foo'.js'\n    // use script\n    // note that in IE8 and below loading error wouldn't be reported\n  }\n})\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/eldargab/load-script#readme","bugs":{"url":"https://github.com/eldargab/load-script/issues"},"license":"MIT"}