Nonviolent Pirate Mobster

    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

    4

    Version

    3.0.3

    License

    MIT

    Last publish

    Collaborators

    • ramitos