@mersanuzun/js-loader

1.1.6 • Public • Published

JS Loader

Load javascript files asynchronously

Install

npm i @mersanuzun/js-loader

Usage

const JSLoader = require('@mersanuzun/js-loader');

JSLoader.loadJS('https://code.jquery.com/jquery-3.5.0.min.js', () => {
  console.log('Done!');
}, false);

JSLoader.loadJSs([
  {
    path: 'https://code.jquery.com/jquery-3.5.0.min.js',
    cb: () => {
      console.log('Done Jquery');
    },
    async: true,
  },
  {
    path: 'vendor.js',
    cb: () => {
      console.log('Done Vendor');
    },
    async: true,
  }
]);

Readme

Keywords

Package Sidebar

Install

npm i @mersanuzun/js-loader

Weekly Downloads

0

Version

1.1.6

License

ISC

Unpacked Size

4.87 kB

Total Files

8

Last publish

Collaborators

  • mersanuzun