# @specialblend/unpromisify

> convert async functions into callback style functions

Latest version **0.0.1** (published 2019-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install @specialblend/unpromisify
pnpm add @specialblend/unpromisify
yarn add @specialblend/unpromisify
bun add @specialblend/unpromisify
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-07-04 |
| First published | 2019-07-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cj@specialblend.net |
| Maintainers | __specialblend__ |
| Keywords | util, promisify, unpromisify |

## Links

- npm: https://www.npmjs.com/package/@specialblend/unpromisify
- Repository: https://github.com/specialblend/unpromisify
- Homepage: https://github.com/specialblend/unpromisify#readme
- Issues: https://github.com/specialblend/unpromisify/issues
- npm.io page: https://npm.io/package/@specialblend/unpromisify

## 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

- 0.0.1 (latest) — 2019-07-04
- 0.0.0 — 2019-07-04

## README

# @specialblend/unpromisify

convert async functions into callback style functions

## Install

`npm install @specialblend/unpromisify`

## Example

#### import

```ecmascript 6
import unpromisify from '@specialblend/unpromisify'

const checkYoSelfFoo = async name => `Hey ${name}, checkYoSelfFoo!`

const checkYoSelfBar = unpromisify(checkYoSelfFoo)

checkYoSelfFoo('@specialblend')
    .then(console.log)  // => 'Hey @specialblend, checkYoSelfFoo!'
    .catch(console.error)

checkYoSelfBar('@specialblend', (err, data) => {
    if(err) console.error(err)
    console.log(data)   // => 'Hey @specialblend, checkYoSelfFoo!'
})

```

#### require

```javascript
const unpromisify = require('@specialblend/unpromisify')

function checkYoSelfFoo (name) {
	return Promise.resolve('Hey ' + name + ', checkYoSelfFoo!')
}

const checkYoSelfBar = unpromisify(checkYoSelfFoo)

checkYoSelfFoo('@specialblend')
    .then(console.log)  // => 'Hey @specialblend, checkYoSelfFoo!'
    .catch(console.error)

checkYoSelfBar('@specialblend', function (err, data) {
    if(err) console.error(err)
    console.log(data)   // => 'Hey @specialblend, checkYoSelfFoo!'
})

```

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