
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
util.promisify
Advanced tools
Polyfill for util.promisify in node versions < v8
node v8.0.0 added support for a built-in util.promisify
: https://github.com/nodejs/node/pull/12442/
This package provides the built-in util.promisify
in node v8.0.0 and later, and a replacement in other environments.
Direct
const promisify = require('util.promisify');
// Use `promisify` just like the built-in method on `util`
Shim
require('util.promisify/shim')();
// `util.promisify` is now defined
const util = require('util');
// Use `util.promisify`
Note: this package requires a native ES5 environment, and for Promise
to be globally available. It will throw upon requiring it if these are not present.
If you want to promisify a whole module, like the fs
module, you can use util.promisify-all
.
v1.1.3 - 2024-12-18
call-bind
, define-data-property
, es-errors
, es-object-atoms
, get-intrinsic
f3b4baa
fda95ae
509cfcb
@es-shims/api
, @ljharb/eslint-config
, auto-changelog
, npmignore
, tape
3712bb5
call-bind
, has-proto
, has-symbols
, object.getownpropertydescriptors
, safe-array-concat
4d1441e
define-properties
, object.getownpropertydescriptors
, safe-array-concat
47a969e
call-bound
directly 48dba6c
aud
, tape
7aa0c21
@es-shims/api
, @ljharb/eslint-config
0817cfd
engines.node
9d08241
aud
with npm audit
cf287ac
fb9e435
FAQs
Polyfill/shim for util.promisify in node versions < v8
The npm package util.promisify receives a total of 7,243,574 weekly downloads. As such, util.promisify popularity was classified as popular.
We found that util.promisify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.