Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 401x 401x 2x 2x 2x 315x 315x 2x 2x 2x 2334x 2424x 2424x 2334x | export const noop = () => {};
// Adapted from https://github.com/then/is-promise/blob/master/index.js
// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE
/**
* @template [T=any]
* @param {any} value
* @returns {value is PromiseLike<T>}
*/
export function is_promise(value) {
return typeof value?.then === 'function';
}
/** @param {Function} fn */
export function run(fn) {
return fn();
}
/** @param {Array<() => void>} arr */
export function run_all(arr) {
for (var i = 0; i < arr.length; i++) {
arr[i]();
}
}
|