node-modules/mz-modules

Name: mz-modules

Owner: node_modules

Description: Same as `mz`, but wrap modules in the world rather than core API.

Created: 2017-02-08 04:39:28.0

Updated: 2018-04-17 00:33:37.0

Pushed: 2018-02-13 03:31:01.0

Homepage:

Size: 11

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mz-modules

Same as mz, but wrap many popular modules rather than core API.

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Node require >= 4.0.0

Usage

Install it

m i mz-modules

Require it

t mkdirp = require('mz-modules/mkdirp');

You can also require it from the main entry, but it will load other modules in mz-modules.

t mkdirp = require('mz-modules').mkdirp;

Use it

sing promise
rp('/path/to/dir').then(() => console.log('done'));

r if you are using async function
c function doSomething() {
ait mkdirp('/path/to/dir');

Warning: nextTick and setImmediate is little slower than callback, because promise queue is after nextTick.

Modules
Contribute

You can request adding module to mz-modules

  1. Create a issue let us know why you want to add the module.
  2. Add a module, named xx
  3. create xx.js that exports a function should return promise.
  4. require xx.js in index.js
  5. add a testcase for it in test/xx.test.js
  6. add xx.js to files in package.json
  7. Create a pull request
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.