promise-denodeifydeprecated

A method for converting a Node.js-style asynchronous function into a function that returns a promise.

Usage no npm install needed!

<script type="module">
  import promiseDenodeify from 'https://cdn.skypack.dev/promise-denodeify';
</script>

README

promise-denodeify

A method for converting a Node.js-style asynchronous function into a function that returns a promise.

license npm downloads

build coverage code climate dependencies devDependencies

Getting Started

Installation

npm install promise-denodeify --save

Integration

var denodeify = require('promise-denodeify');

API

denodeify(nodeFunction, Promise, [noArgs])

var readFile = denodeify(fs.readFile, Promise, false);

readFile('filename').then(function (data) {
    // ...
}).catch(handleError);

Running Tests

To run the test suite first install the development dependencies:

npm install

then run the tests:

npm test