BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Node.js Brings Debounce, Throttle, and PKCS#12 Parsing Into Core Modules

Node.js Brings Debounce, Throttle, and PKCS#12 Parsing Into Core Modules

Listen to this article -  0:00

Node.js, the popular open-source JavaScript runtime, has pulled a handful of long-requested utilities directly into its standard library. Debounce and throttle helpers have landed in node:util, a new crypto.parsePKCS12() API now surfaces private keys and certificates from .p12 and .pfx bundles, and the experimental Virtual File System has been extended into node:ffi. The additions shipped as part of Node.js 26.10.0, one of a steady run of Current-line releases leading into the Node.js 26 LTS line that is now Active LTS under the codename "Lithium".

The headline change is the arrival of util.debounce() and util.throttle() in the core util module. Rate-limiting helpers have long been one of the most commonly vendored dependencies in the Node.js ecosystem, typically pulled from lodash or the throttle-debounce package. James M Snell landed both in a single pull request, with Matteo Collina noting that he uses these utilities in "essentially every app."

Contributors ljharb and bakkot flagged the awkwardness of using an AbortSignal (which only transitions to aborted once) inside a function meant to be called repeatedly, so Snell reworked the signal to cancel every future invocation and added a leading-edge option so the first call can fire immediately.

Alongside these helpers, he same change also added also carried util.markPromiseAsHandled(), an explicit mechanism for framework authors to tell the runtime that a promise has been handled, addressing a long-running source of confusion around unhandled-rejection signalling.

crypto.parsePKCS12() closes a different long-standing gap. Node.js already parsed .p12 and .pfx bundles internally for TLS's pfx option, but it never surfaced the result to JavaScript. The new API wraps OpenSSL's d2i_PKCS12_bio() and PKCS12_parse(), returning an object with privateKey, certificate, and additionalCertificates fields. It was Brian Muenzenmeyer's first significant core contribution touching C++, refined with Filip Skokan, and it removes the need to shell out to the openssl CLI or depend on packages like node-forge.

The experimental Virtual File System has also grown further into the platform. Matteo Collina and Philipp Dunkel extended node:ffi to load libraries straight from a mounted VFS, using the same self-cleaning anonymous memfd trick that native addons already rely on under Linux. The same patch fixed a bug where dlopen forwarded an undefined flags argument, which silently broke addon loading from the real filesystem.

Compared with Bun and Deno, both of which have tended to ship richer standard libraries by default, this run of additions continues a visible trend in Node.js of reducing reliance on userland utilities. The shift also has supply-chain implications, cutting a handful of small dependencies out of typical node_modules trees.

The changes landed first on the Current line, but Node.js has kept moving since. v26.11.0 followed with further Buffer and http helpers, and Node.js 26 has now moved to Active LTS as "Lithium" with support through April 2029. Installers for all major platforms are available at nodejs.org/en/download.

Node.js is an open-source, cross-platform JavaScript runtime maintained under the OpenJS Foundation.

About the Author

Rate this Article

Adoption
Style

BT