Node.js 26.10 Puts debounce and throttle in Core

Node.js 26.10.0 shipped on September 22, 2026 with two additions that read as minor in the changelog and are not: util.debounce() and util.throttle() now live in the runtime. They remove a dependency from most projects — and they arrive with async semantics the popular alternatives never had.

The problem: every project rewrites them

Debouncing and rate limiting are among the most repeated patterns in backend work: coalescing filesystem events before a rebuild, calming a chatty webhook, respecting a third-party API's quota. The usual fix was one of three: copy a function from an old blog post, pull in all of lodash, or add a small package nobody reviews.

That third path costs more than it looks. A small, unreviewed dependency is exactly the surface targeted by npm attacks that execute at import time. The second path carries a deeper problem: the classic debounce was written in the callback era. It knows nothing about promises, nothing about AbortSignal, and nothing about what happens when calls pile up faster than they drain.

What changed

Both functions are async-first by design. The returned function gives back a promise and carries its own controls: cancel(), flush(), pending, pendingCount, plus ref() and unref() to decide whether a pending timer keeps the event loop alive.

The throttle signature is wider than the familiar one:

js
throttle(fn, limit, interval[, options])

The options are what make it production-grade. concurrency caps how many invocations may be unsettled at once. overflow chooses between 'queue' (the default) and 'drop'. maxPending bounds the queue. strict enforces the limit across any rolling interval rather than a fixed window that resets.

Worth noting too: the returned function is not just a wrapper. pendingCount, activeCount and hasImmediateCapacity() make queue state readable from outside, which is what lets it feed real metrics instead of guesswork. And when everything is cancelled — via cancel() or a shared AbortSignal — queued calls reject with AbortError rather than hanging forever.

A practical example

js
import { throttle, debounce } from 'node:util';

// Provider quota: two requests per second, three in flight at most
const fetchItem = throttle(async (id) => {
  const res = await fetch(`https://api.example.com/items/${id}`);
  return res.json();
}, 2, 1_000, { concurrency: 3, overflow: 'queue', maxPending: 500 });

const items = await Promise.all([1, 2, 3, 4].map(fetchItem));

// Rebuild after 200ms of quiet, without holding the process open
const rebuild = debounce(async () => {
  await build();
}, 200).unref();

watcher.on('change', rebuild);

One detail from the official docs matters more than it first appears: rate capacity is consumed when fn starts, not when a call enters the queue, and concurrency capacity is released when the returned value settles. Separating those two dimensions is what lets the same wrapper survive a slow upstream instead of collapsing under it.

Real-world caveats

First: the 26.x line is Current, not LTS. Conservative production stays on 24.x until these land there.

Second: the semantics are not a port of lodash. With default debounce, every call inside the window resolves with the result of the final invocation — they are not silently dropped — unless rejectOnCancel is set. Anyone translating old code line by line will meet different behavior.

Third: overflow: 'queue' with the default maxPending means an unbounded queue. Under real pressure that is a deferred memory leak, not protection; setting an explicit bound is part of correct configuration, not an optimization. With overflow: 'drop', rejections surface as ERR_THROTTLED and need handling.

Fourth, and architecturally the biggest: this throttling lives inside one process. Run several instances behind a load balancer and each computes its own window, so the effective rate is the limit multiplied by the instance count. For provider quotas metered per account rather than per process, shared coordination — Redis or a central queue — remains the correct answer, with util.throttle as a local guard on top of it, not a replacement for it.

Takeaway

The pattern across recent Node.js releases is consistent: conventions that settled in the ecosystem move into the runtime, usually with sharper semantics than the originals had. The value is not one fewer line in package.json. It is that rate limiting now sits on a documented, reviewed foundation that ships and versions with everything else.

Primary source: Node.js 26.10.0 release notes and the node:util documentation.

Node.js 26.10 Puts debounce and throttle in Core · bahashwan.dev