Skip to content

buzinas/smallest-script-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smallest-script-loader

Smallest promise-based script loader with cache support

Installation

Yarn

yarn add smallest-script-loader

or NPM

npm i --save smallest-script-loader

Usage

import loadScript from 'smallest-script-loader';

loadScript('//www.somewebsite.com/some-script.js')
  .then(() => {
    // do something after loading the script
  })
  .catch(e => {
    console.error(e);
  });

Browser support

Only modern/evergreen browsers

License

MIT

About

Smallest promise-based script loader with cache support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published