queue-tick v1.0.1 is a minimal shim that schedules a callback on the next tick, preferring process.nextTick in Node.js (for broader compatibility) and falling back to queueMicrotask in browsers. It's stable, has no dependencies, and is ideal for micro-libraries needing a reliable nextTick across environments without polyfills. Last updated in 2022; release cadence is low as it's feature-complete.
npm install queue-tickNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates scheduling a callback on the next tick using queue-tick, showing that the callback executes after the current synchronous code.
Wrap your callback in an anonymous function to pass arguments: queueTick(() => myCallback(arg1, arg2))
Use a polyfill for queueMicrotask in browsers that don't support it, or use process.nextTick polyfill with setImmediate/setTimeout.
If cancellation is needed, use process.nextTick directly or a different scheduler.
Use default import: import queueTick from 'queue-tick'
Ensure the environment supports queueMicrotask (modern browsers) or use a polyfill.
No dependency data recorded yet.