load-lib
0.1.0 • Public • Published load-lib
Load library with:
- scriptjs — is an asynchronous JavaScript loader.
- loadCSS — A function for loading CSS asynchronously
Install
npm install --save load-lib
Usage
import loadLib from 'load-lib';
loadLib('jQuery', ['https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.js'], (jQuery) => {
console.log(jQuery);
});
Note: support Promise format
Options
loadLib(name, assets, callback);
name
- library name
assets
- library assets
callback
- callback with library
License
MIT.
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads