Registry / devops / quicktask

quicktask

JSON →
library1.2.0jsnpmunverified

Tiny cross-environment microtask queue scheduler (~1kB). Version 1.2.0 (stable, no recent updates). Falls back through queueMicrotask, setImmediate, process.nextTick, setTimeout. Smaller than similar libraries like nanotask, and works in browsers, Node.js, Deno, and other JS runtimes. TypeScript declarations included. Not recommended over native queueMicrotask for modern environments.

npm install quicktask
INSTALL
IMPORT
SIG · QUICKTASK
Q
quicktask
devopsjavascriptv1.2.0
harness data pending
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.

quicktask
import quicktask from 'quicktask'
const quicktask = require('quicktask')
ESM is the recommended module system; TypeScript types work with import.
default
import quicktask from 'quicktask'
import { quicktask } from 'quicktask'
The package has a default export; named export does not exist.
schedule
const schedule = quicktask(); schedule(fn)
const schedule = new quicktask()
quicktask() returns a function, not a class instance.

Creates a microtask scheduler and queues a function to run before the next event loop iteration.

import quicktask from 'quicktask'; const schedule = quicktask(); schedule(() => { console.log('Hello from microtask!'); }); console.log('This runs first');
Debug
Known issues
gotchaQuicktask is unnecessary in modern Node.js (>=11) and browsers that support queueMicrotask. Use native queueMicrotask directly for better performance.
fix
Replace with native queueMicrotask or Promise.then().
affects: all
gotchaThe schedule function queues microtasks, but if you schedule from within a microtask, they may be batched differently. Not suitable for strict microtask ordering guarantees.
fix
Use queueMicrotask directly for precise microtask execution.
affects: all
Errors
Common errors & fixes
TypeError: quicktask is not a function
Incorrect CommonJS require of default export.
fix
Use `const quicktask = require('quicktask').default;` or switch to ESM import.
Cannot find module 'quicktask'
Package not installed.
fix
Run `npm install quicktask` in your project root.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
quicktask — npm install quicktask · libregistry