load-script-p

Load script as promise.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
load-script-p
101.0.04 years ago4 years agoMinified + gzip package size for load-script-p in KB

Readme

load-script-p
!Build Statusci-imgci !BrowserStack Statusbrowserstack-imgbrowserstack
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ć