opfs
Yet another node fs wrapper.
- With promisfied methods that still work with callbacks.
- Set your own custom Promise.
- Non constructor functions bound to fs.
- All other original properties transferred as is.
- No dependencies.
- Optional pkgs promisified and added: mkdirp, rimraf.
- Save full caller stack (10-20% performance penalty)
Install
npm install --save opfs
Usage
const opfs = ; // Set custom Promise to bluebird. This is automatic if// it's found in your package.json and node_modules. opfs; // To use native Promise even if bluebird was found. opfs; // To turn off save full caller stack opfs; // promise APIs opfs ; // native promises methods (if available) node 10+ opfspromises ; // callback still works opfs; //// optional pkgs (if found in your package.json and node_modules)// // mkdirpopfs$;opfs$; // rimrafopfs$;opfs$; // All other fs props transferred console;console;console;console;
License
Copyright (c) 2018-present, Joel Chen
Licensed under the Apache License, Version 2.0.