1.0.4 • Published 6 years ago

storm-load v1.0.4

Weekly downloads
18
License
MIT
Repository
github
Last release
6 years ago

Storm load

npm version

Lightweight promise-based script loader for asynchronous and synchronous JS loading

Example

https://stormid.github.io/storm-load

Usage

JS

npm i -S storm-load

either using es6 import

import Load from 'storm-load;

//asynchronous script loading
Load('script-name.js')
    .then(() => {
        //use loaded JS
    });

//synchronous loading
Load(['script-1.js', 'script-that-depends-on-script-1.js'], false)
    .then(() => {
        //use loaded JS
    });

Tests

npm run test

Browser support

This is module has both es6 and es5 distributions. The es6 version should be used in a workflow that transpiles.

The es5 version depends upon Promises so all evergreen browsers are supported out of the box, ie9+ is supported with polyfills. ie8+ will work with even more polyfils for Array functions and eventListeners.

Dependencies

None

License

MIT

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago