load-script-p
v1.0.0
Published
Load script as promise.
Downloads
2,425
Readme
load-script-p
Load script as promise.
Install
npm install load-script-p --save
Usage
import loadScript from 'load-script-p';
loadScript('http://example.com/jackie.js')
.then(()=> {
// ...
});
API
loadScript(src)
Returns: Promise
Loads script from URL.
src
Type: String
Script URL.
Browser support
Tested in IE9+ and all modern browsers.
Test
For local automated tests, run npm run test:automated:local
(append :watch
for watcher support).
License
MIT © Ivan Nikolić