# nano-promisify

> A minimal promisifying callback-based function(s) module

Latest version **1.1.0** (published 2016-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install nano-promisify
pnpm add nano-promisify
yarn add nano-promisify
bun add nano-promisify
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-02-14 |
| First published | 2016-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Vladimir Antonov |
| Maintainers | holixus |
| Keywords | promisify, thenify |

## Links

- npm: https://www.npmjs.com/package/nano-promisify
- Repository: https://github.com/Holixus/nano-promisify
- Issues: http://github.com/Holixus/nano-promisify/issues
- npm.io page: https://npm.io/package/nano-promisify

## Dependencies (1)

- [nano-promise](https://npm.io/package/nano-promise.md) 1

## Recent versions

- 1.1.0 (latest) — 2016-02-14
- 1.0.5 — 2016-01-22

## README

[![Gitter][gitter-image]][gitter-url]
[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

# nano-promisify

Promisify callback-based function(s)

## Usage

### Converting a function

```js
var promisify = require('nano-promisify');

var readFile = promisify(fs.readFile);

readFile('./indes.js', 'utf8')
  .then(function (text) {
    console.log(text);
  })
  .catch(function (e) {
    console.error(e);
  });
```

### Converting a library

Only callback functions will be wrapped.

```js
var promisify = require('nano-promisify');

var fs = promisify(fs);

fs.readFile('./indes.js', 'utf8')
  .then(function (text) {
    console.log(text);
  })
  .catch(function (e) {
    console.error(e);
  });
```

[gitter-image]: https://badges.gitter.im/Holixus/nano-promisify.svg
[gitter-url]: https://gitter.im/Holixus/nano-promisify

[npm-image]: https://img.shields.io/npm/v/nano-promisify.svg
[npm-url]: https://npmjs.org/package/nano-promisify

[github-tag]: http://img.shields.io/github/tag/Holixus/nano-promisify.svg
[github-url]: https://github.com/Holixus/nano-promisify/tags

[travis-image]: https://travis-ci.org/Holixus/nano-promisify.svg?branch=master
[travis-url]: https://travis-ci.org/Holixus/nano-promisify

[coveralls-image]: https://img.shields.io/coveralls/Holixus/nano-promisify.svg
[coveralls-url]: https://coveralls.io/r/Holixus/nano-promisify

[david-image]: http://img.shields.io/david/Holixus/nano-promisify.svg
[david-url]: https://david-dm.org/Holixus/nano-promisify

[license-image]: http://img.shields.io/npm/l/nano-promisify.svg
[license-url]: LICENSE

[downloads-image]: http://img.shields.io/npm/dm/nano-promisify.svg
[downloads-url]: https://npmjs.org/package/nano-promisify

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