# promise-cb

> Promise-callback helper fuctions

Latest version **0.1.4** (published 2016-10-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install promise-cb
pnpm add promise-cb
yarn add promise-cb
bun add promise-cb
```

## 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.4 |
| Published | 2016-10-27 |
| First published | 2016-02-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Louay Alakkad |
| Maintainers | louy |

## Links

- npm: https://www.npmjs.com/package/promise-cb
- Repository: https://github.com/urbanmassage/promise-cb
- Homepage: https://github.com/urbanmassage/promise-cb#readme
- Issues: https://github.com/urbanmassage/promise-cb/issues
- npm.io page: https://npm.io/package/promise-cb

## Recent versions

- 0.1.4 (latest) — 2016-10-27
- 0.1.3 — 2016-09-06
- 0.1.2 — 2016-07-16
- 0.1.1 — 2016-04-25
- 0.1.0 — 2016-02-01

## README

# Promise-CB

Promise-callback helper functions.


## fromCallback
Creates a Promise from a callback-style function.

Example:
```js
fromCallback(cb => fs.readFile(file, cb));
```


## toCallback
Calls a callback function with the result of a promise once it settles.

Example:
```js
toCallback(promise, (err, result) => {
  if (err) console.error(err.stack);
  else doSomething(result);
});
```

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