idle-promise
v1.1.6
Published
requestIdleCallback with a Promise interface and setTimeout fallback.
Downloads
47
Readme
idle-promise
requestIdleCallback
with a Promise interface and setTimeout
fallback.
Installation
npm install --save idle-promise
Usage
Promise
const idle = require('idle-promise')
idle().then(() => {
// Do somethgin when idle
// ...
})
await
const idle = require('idle-promise')
await idle()
// Do somethgin when idle
// ...
Credits
- Icon created by Adrien Coquet
caiogondim.com · GitHub @caiogondim · Twitter @caio_gondim