https://github.com/enlight/node-fs-promisified
Promise based API wrapper for the NodeJS File System with TypeScript type definitions
https://github.com/enlight/node-fs-promisified
Last synced: 3 months ago
JSON representation
Promise based API wrapper for the NodeJS File System with TypeScript type definitions
- Host: GitHub
- URL: https://github.com/enlight/node-fs-promisified
- Owner: enlight
- License: mit
- Created: 2015-12-29T14:51:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-22T06:49:02.000Z (over 10 years ago)
- Last Synced: 2025-01-27T07:43:19.670Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fs-promisified
Promise based API wrapper for the NodeJS File System with TypeScript type definitions.
## Overview
There are multiple libraries that can promisify callback based NodeJS APIs, however, if you then
want to use the promisified API in TypeScript all the existing callback based type definitions for
NodeJS will be completely and utterly useless. This project aims to solve that particular problem
for the File System API.
NOTE: The current wrapper is incomplete, and I'll only be promisifying the bits of the API that
I actually use. Feel free to submit PRs for anything that's missing.
## Setup
```
npm install https://github.com/enlight/node-fs-promisified --save
```
## Usage
```typescript
import * as fsp from `fs-promisified`;
fsp.readFile(someFilePath, 'utf8')
.then(data => {
// process the data
...
});
```
##License
MIT