Registry / devops / queue-tick

queue-tick

JSON →
library1.0.1jsnpmunverified

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.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default export only; named import will give undefined.

import queueTick from 'queue-tick'

CommonJS default import, no destructuring.

const queueTick = require('queue-tick')

Namespace import not supported; use default import.

const queueTick = require('queue-tick')

Demonstrates scheduling a callback on the next tick using queue-tick, showing that the callback executes after the current synchronous code.

const queueTick = require('queue-tick'); queueTick(() => { console.log('This runs on the next tick'); }); console.log('This runs first'); // Output: // This runs first // This runs on the next tick
Debug
Known footguns
gotchaqueue-tick does not accept arguments to the callback; unlike process.nextTick which passes arguments.
gotchaqueue-tick may not work in older browsers that lack queueMicrotask; the package requires queueMicrotask or falls back to no-op? (No fallback documented).
gotchaqueue-tick does not return anything; unlike process.nextTick which returns a timeout object for cancellation.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
5 hits · last 30 days
ahrefsbot
1
Resources