mirror of
https://codeberg.org/Kankys/NewLukasBlog.git
synced 2026-11-11 14:14:36 +01:00
refactor
This commit is contained in:
1 parent
fc2547bd59
commit
231006e61d
2143 files changed
No files matched your search
+9
@@ -0,0 +1,9 @@
|
||||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
let promise
|
||||
|
||||
module.exports = typeof queueMicrotask === 'function'
|
||||
? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)
|
||||
// reuse resolved promise, and allocate it lazily
|
||||
: cb => (promise || (promise = Promise.resolve()))
|
||||
.then(cb)
|
||||
.catch(err => setTimeout(() => { throw err }, 0))
|
||||
Reference in new issue
Block a user