node-async-fs

1.0.0 • Public • Published

Installation

Using yarn:

yarn add node-async-fs

Using npm:

npm i node-async-fs

Why node-async-fs?

-use es6 async/await resolve fs model callback

-让 node fs 模块支持 async/await promise.then(() => {}) 语法

Getting started

const fs = require('node-async-fs')
or
const {stat, mkdir} = require('node-async-fs')

// use
fs.mkdir().then(() => {})
   ......

mkdir().then(() => {})
   ......

async function () {
  await mkdir()
  await stat()
  await access()
  ......
}

test

  npm test

Package Sidebar

Install

npm i node-async-fs

Weekly Downloads

4

Version

1.0.0

License

ISC

Unpacked Size

2.06 kB

Total Files

4

Last publish

Collaborators

  • loo4p