Sha256: e56672f1cf34e0be38f3c28c164810c878a243918d19bd0ac82d701209b5b9a2

Contents?: true

Size: 402 Bytes

Versions: 43

Compression:

Stored size: 402 Bytes

Contents

/*! 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))

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.7 node_modules/queue-microtask/index.js
immosquare-cleaner-0.1.6 node_modules/queue-microtask/index.js
decidim-0.26.8 packages/eslint-config/node_modules/queue-microtask/index.js