Noteworthy Programs Map

    lagden-promisify

    3.0.0 • Public • Published

    lagden-promisify NPM version

    Build Status Coverage Status Dependency Status devDependency Status

    Convert callback to promise

    Install

    Compatible with Node.js >= 6

    $ npm i -S lagden-promisify
    

    Compatible with Node.js >= 5.0.0

    $ npm i -S lagden-promisify@2.0.0
    

    Compatible with Node.js >= 4

    $ npm i -S lagden-promisify@1.0.2
    

    Usage

    const promisify = require('lagden-promisify');
    const fs = require('fs');
    const readfile = promisify(fs.readFile);
     
    readfile('./sample.txt')
      .then(data => console.log);
      .catch(err => console.log);

    License

    MIT © Thiago Lagden

    Install

    npm i lagden-promisify

    DownloadsWeekly Downloads

    4

    Version

    3.0.0

    License

    MIT

    Last publish

    Collaborators

    • lagden