Skip to content

tinchoz49/proc-nexttick

Repository files navigation

proc-nexttick

Build Status JavaScript Style Guide standard-readme compliant

Universal process.nextTick for latest browsers

Install

$ npm install proc-nexttick

Usage

const nextTick = require('proc-nexttick')

nextTick((arg1, arg2) => {
  console.log('executed in the next tick', arg1, arg2)
}, 0, 1)

In Node.js it will use the native process.nextTick without changes.

In the browser:

  1. It tries to use queueMicrotask.
  2. Fallback to use a process shim implementation provided by some bundler tool like browserify or webpack.
  3. Fallback to use Promises.

Issues

🐛 If you found an issue we encourage you to report it on github. Please specify your OS and the actions to reproduce it.

Contributing

👥 Ideas and contributions to the project are welcome. You must follow this guideline.

License

MIT ©

About

Universal process.nextTick for latest browsers

Resources

License

Stars

Watchers

Forks

Packages

No packages published