# node-style-promisify

> Convert any Node.js-style callback API into a function that returns an ES6 promise

Latest version **0.1.1** (published 2015-11-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-style-promisify
pnpm add node-style-promisify
yarn add node-style-promisify
bun add node-style-promisify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-11-03 |
| First published | 2015-11-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Manish Jethani |
| Maintainers | mjethani |
| Keywords | es6, promise, node, callback |

## Links

- npm: https://www.npmjs.com/package/node-style-promisify
- Repository: https://github.com/mjethani/promisify
- Homepage: https://github.com/mjethani/promisify#readme
- Issues: https://github.com/mjethani/promisify/issues
- npm.io page: https://npm.io/package/node-style-promisify

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-11-03
- 0.1.0 — 2015-11-02

## README

## Installation

```console
$ npm i node-style-promisify
node-style-promisify@0.1.1 node_modules/node-style-promisify
$ 
```

## Example

```javascript
import fs from 'fs';

import promisify from 'node-style-promisify';

const readFile = promisify(fs, fs.readFile);

readFile('file.txt', 'utf8').then(([ data ]) => {
  process.stdout.write(data);
}).catch(error => {
  console.error(error.toString());
});
```

## API

### promisify(thisArg, func)

 *  `thisArg` The value of `this` to be passed to `func` when it is called
 *  `func` The function to call via the wrapper

Returns a wrapper around `func` that returns a `Promise` object when called.

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