Promisified 'fs' API, for TypeScript.
Just import it and use it like the regular 'fs' module.
npm install @sane/fs --save
If foo
gives you a callback, fooAsync
will give you a promise. See src/index.ts
for a list of promisifed methods.
import * as fs from '@sane/fs';
fs.unlinkAsync('/tmp/foo')
.then(() => {
// ...
});
- Requires Node >= v0.12
- Bump up the version number in package.json
- Add a section for the new release in CHANGELOG.md
- Run npm run-script compile to ensure it builds
- Commit
- Run npm publish
- Create a git tag for the new release and push it