async-preload-img
Promise based image preloader
Installation
npm install --save async-preload-img
Usage
async/await
import preloadImg from 'async-preload-img'
try {
await preloadImg('https://image-path.com')
} catch (error) {
}
Promise
import preloadImg from 'async-preload-img'
preloadImg('https://image-path.com')
.then(() => {
})
.catch(() => {
})
If you found this library useful and are willing to donate, transfer some
bitcoins to 1BqqKiZA8Tq43CdukdBEwCdDD42jxuX9UY
.
caiogondim.com ·
GitHub @caiogondim ·
Twitter @caio_gondim