Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inwebo/assetsloader.js
Asynchronously Load assets in the Browser with Javascript
https://github.com/inwebo/assetsloader.js
Last synced: about 2 months ago
JSON representation
Asynchronously Load assets in the Browser with Javascript
- Host: GitHub
- URL: https://github.com/inwebo/assetsloader.js
- Owner: inwebo
- License: gpl-3.0
- Created: 2020-05-25T18:21:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T20:26:37.000Z (3 months ago)
- Last Synced: 2024-10-14T00:50:04.875Z (3 months ago)
- Language: JavaScript
- Size: 664 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# AssetsLoader.js
Asynchronously Load assets in the Browser with promises.
## Install
### Npm
```shell script
npm i @inwebo/assetsloader.js
```### Yarn
```shell script
yarn i @inwebo/assetsloader.js
```### Git
```shell script
git clone https://github.com/inwebo/AssetsLoader.js.git
```## Use
```ecmascript 6
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);
});
```