To be used in environment agnostic modules that need nextTick functionality.
- When run in Node.js
process.nextTickis used - In modern engines, microtask resolution is guaranteed by
queueMicrotask - In older browsers,
MutationObserveris used as a fallback - In other engines
setImmediateorsetTimeout(fn, 0)is used as fallback. - If none of the above is supported module resolves to
null
In your project path:
$ npm install next-tick
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: Browserify, Webmake or Webpack
$ npm test
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
