| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Same as mz, but wrap many popular modules rather than core API.
Node require >= 4.0.0
Install it
$ npm i mz-modulesRequire it
const mkdirp = require('mz-modules/mkdirp');You can also require it from the main entry, but it will load other modules in mz-modules.
const mkdirp = require('mz-modules').mkdirp;Use it
// Using promise
mkdirp('/path/to/dir').then(() => console.log('done'));
// Or if you are using async function
async function doSomething() {
await mkdirp('/path/to/dir');
}Warning: nextTick and setImmediate is little slower than callback, because promise queue is after nextTick.
You can request adding module to mz-modules
| Back | FazBrowse Home | New Git URL |