promisify-callback

A small ES6 module that turns any async function with callback into a promise

Usage no npm install needed!

<script type="module">
  import promisifyCallback from 'https://cdn.skypack.dev/promisify-callback';
</script>

README

promisify-callback

A small ES6 module that turns any async function with callback into a promise

Install

$ npm i promisify-callback

Usage Example

import promisify from 'promisify-callback';

promisify(fs.readFile, '/path/to/file').then(/*code here*/);

Test

$ npm test