*nix Programming Mammals

    pfs

    3.0.0 • Public • Published

    pfs

    node version travis-ci build status StandardJS

    A tiny promise wrapper around fs

    Install

    $ yarn add pfs
     
    # or npm 
    $ npm install --save pfs

    Use

    Exactly how you would use fs. This is a drop-in replacement that converts any callback-based functions to promises

    const fs = require('pfs')
     
    // now uses promise
    fs.readFile('my-file.txt', 'utf-8')
      .then(...)
      .catch(...)
     
    // still works the same
    fs.readFileSync('my-file.txt', 'utf-8')
     
    // properties are also unchanged
    fs.constants.R_OK

    Changelog

    License

    MIT

    Install

    npm i pfs

    DownloadsWeekly Downloads

    1,876

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    3.81 kB

    Total Files

    4

    Last publish

    Collaborators

    • chrisdothtml