1.0.0 • Published 6 years ago

node-async-fs v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

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