1.0.1 • Published 5 years ago

promised-script-loader v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Promised-Script-Loader

A Promise based script loader with in built caching. Supports both async and defer loading.

To Install

npm i Promised-script-loader

To Use

import scriptLoader from '@script-loader'

scriptLoader([ an array of all the scripts to load ], options = { how to load it })
      .then(() => {
        console.log('script has been loaded')
      })
      .catch(err => console.log(err))

this will return a promise

Load Options

options : {
  "async": boolean,
  "defer": boolean
}

Author

Saurabh khandelwal (https://github.com/saurabhkhandelwal)

License

MIT License