Necromancers Playing MTG
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

apr-awaitify

3.0.3 • Public • Published

awaitify

Transform a callback-based function into a promise-based one.

Parameters

Examples

import { readFile as readFileCb } from 'fs';
import awaitify from 'apr-awaitify';
import path from 'path';
 
const readFile = awaitify(readFileCb);
const pkgPath = path.join(__dirname, './package.json');
 
const pkg = await readFile(pkgPath, 'utf-8');

Returns Function

install

npm i apr-awaitify

Downloadsweekly downloads

3

version

3.0.3

license

MIT

homepage

apr.js.org

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability