1.0.0 • Published 11 months ago
@giapspzoo/next-tick
Licence
—
Version
1.0.0
Deps
0
Size
4 kB
Vulns
0
Weekly
0
@giapspzoo/next-tick
A minimal utility that defers a function to the next event loop tick using setTimeout(fn). Useful for scheduling asynchronous execution without relying on Node.js-specific process.nextTick() or Promise-based microtasks. Works in both Node.js and browser environments.
Usage
import nextTick from "@giapspzoo/next-tick";
nextTick(() => {
doSomething();
});