format: prettify entire project
This commit is contained in:
4
node_modules/queue-microtask/index.d.ts
generated
vendored
4
node_modules/queue-microtask/index.d.ts
generated
vendored
@ -1,2 +1,2 @@
|
||||
declare const queueMicrotask: (cb: () => void) => void
|
||||
export = queueMicrotask
|
||||
declare const queueMicrotask: (cb: () => void) => void;
|
||||
export = queueMicrotask;
|
||||
|
18
node_modules/queue-microtask/index.js
generated
vendored
18
node_modules/queue-microtask/index.js
generated
vendored
@ -1,9 +1,13 @@
|
||||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
let promise
|
||||
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))
|
||||
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