# util.promisify

> Polyfill/shim for util.promisify in node versions < v8

Latest version **1.1.3** (published 2024-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install util.promisify
pnpm add util.promisify
yarn add util.promisify
bun add util.promisify
```

## Health

**Score 33/100 (F)** — status: maintenance-mode.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2024-12-18 |
| First published | 2017-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/util.promisify) |
| Module format | CommonJS |
| Node | >= 0.8 |
| Dependencies | 12 |
| Unpacked size | 25.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 125 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | promisify, promise, util, polyfill, shim, util.promisify |

## Links

- npm: https://www.npmjs.com/package/util.promisify
- Repository: https://github.com/ljharb/util.promisify
- Homepage: https://github.com/ljharb/util.promisify#readme
- Issues: https://github.com/ljharb/util.promisify/issues
- Funding: https://github.com/sponsors/ljharb
- npm.io page: https://npm.io/package/util.promisify

## Dependencies (12)

- [for-each](https://npm.io/package/for-each.md) ^0.3.3
- [call-bind](https://npm.io/package/call-bind.md) ^1.0.8
- [es-errors](https://npm.io/package/es-errors.md) ^1.3.0
- [has-proto](https://npm.io/package/has-proto.md) ^1.2.0
- [call-bound](https://npm.io/package/call-bound.md) ^1.0.3
- [has-symbols](https://npm.io/package/has-symbols.md) ^1.1.0
- [get-intrinsic](https://npm.io/package/get-intrinsic.md) ^1.2.6
- [es-object-atoms](https://npm.io/package/es-object-atoms.md) ^1.0.0
- [define-properties](https://npm.io/package/define-properties.md) ^1.2.1
- [safe-array-concat](https://npm.io/package/safe-array-concat.md) ^1.1.3
- [define-data-property](https://npm.io/package/define-data-property.md) ^1.1.4
- [object.getownpropertydescriptors](https://npm.io/package/object.getownpropertydescriptors.md) ^2.1.8

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2024-12-18
- 1.1.2 — 2023-04-20
- 1.1.1 — 2021-01-09
- 1.1.0 — 2021-01-06
- 1.0.1 — 2020-01-16
- 1.0.0 — 2017-05-30

## README

# util.promisify
Polyfill for util.promisify in node versions &lt; 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.

## Usage

**Direct**
```js
const promisify = require('util.promisify');
// Use `promisify` just like the built-in method on `util`
```

**Shim**
```js
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.

## Promisifying modules

If you want to promisify a whole module, like the `fs` module, you can use [`util.promisify-all`](https://www.npmjs.com/package/util.promisify-all).

---
_Source: https://npm.io/package/util.promisify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
