promisfy-readfile
Version:
promise readfileStream
33 lines (23 loc) • 465 B
Markdown
> simple promisfy for readfile
```bash
npm install promisfy-readfile
```
```js
'use strict';
const readFile = require('promisfy-readfile');
let genera = async ()=>{
let da = await readFile(file);
return da;
};
genera().then(res=>{
console.log(res)//buffer type
}).catch(err=>{
throw err
});
```
If you have any question,please click [issues](https://github.com/xtx1130/promisfy-readfile/issues)
MIT