set-microtask
v1.0.0
Published
queueMicrotask with setTimeout API
Downloads
4
Readme
set-microtask
queueMicrotask
with setTimeout
API.
import { setMicrotask, clearMicrotask } from 'set-microtask'
setMicrotask(() => {
console.log('tick')
})
setMicrotask(arg => {
console.log(arg)
}, 'tack')
let id = setMicrotask(() => {
console.log('oi oi oi')
})
clearMicrotask(id)
// ...
// tick tack
But why?
...
See also
- wait-please - await helpers.
License
MIT