@inwebo/assetsloader.js
v0.0.2
Published
Asynchronously Load assets in the Browser with Javascript
Downloads
5
Maintainers
Readme
AssetsLoader.js
Asynchronously Load assets in the Browser with promises.
Install
Npm
npm i @inwebo/assetsloader.js
Yarn
yarn i @inwebo/assetsloader.js
Git
git clone https://github.com/inwebo/AssetsLoader.js.git
Use
import {AssetsLoader} from '@inwebo/assetsloader.js'
const img = AssetsLoader.image('https://raw.githubusercontent.com/inwebo/Sprite.js/master/docs/assets/img/mario.png');
Promise.all([img])
.then(([img]) => {
// img const is available
console.log(img);
});