{"id":13526745,"url":"https://github.com/node-modules/mz-modules","last_synced_at":"2025-06-14T03:07:58.326Z","repository":{"id":47038461,"uuid":"81288069","full_name":"node-modules/mz-modules","owner":"node-modules","description":"Same as `mz`, but wrap modules in the world rather than core API.","archived":false,"fork":false,"pushed_at":"2023-11-30T15:56:25.000Z","size":20,"stargazers_count":56,"open_issues_count":2,"forks_count":3,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-21T07:28:11.070Z","etag":null,"topics":["async-await","mz","promise"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-modules.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-08T04:39:28.000Z","updated_at":"2024-03-14T09:52:09.000Z","dependencies_parsed_at":"2024-01-13T22:59:04.590Z","dependency_job_id":"ac5948bc-1714-489b-a3b9-bb28041d218c","html_url":"https://github.com/node-modules/mz-modules","commit_stats":{"total_commits":11,"total_committers":5,"mean_commits":2.2,"dds":0.6363636363636364,"last_synced_commit":"5a1f32e8a84fbc5f4ccbbf76091b690630201379"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/node-modules/mz-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmz-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmz-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmz-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmz-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-modules","download_url":"https://codeload.github.com/node-modules/mz-modules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmz-modules/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259752078,"owners_count":22905972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","mz","promise"],"created_at":"2024-08-01T06:01:34.107Z","updated_at":"2025-06-14T03:07:58.266Z","avatar_url":"https://github.com/node-modules.png","language":"JavaScript","readme":"# mz-modules\n\nSame as [mz], but wrap many popular modules rather than core API.\n\n[![NPM version][npm-image]][npm-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/mz-modules.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/mz-modules\n[codecov-image]: https://codecov.io/gh/node-modules/mz-modules/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/node-modules/mz-modules\n[snyk-image]: https://snyk.io/test/npm/mz-modules/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/mz-modules\n[download-image]: https://img.shields.io/npm/dm/mz-modules.svg?style=flat-square\n[download-url]: https://npmjs.org/package/mz-modules\n\nNode require `\u003e= 4.0.0`\n\n## Usage\n\nInstall it\n\n```bash\n$ npm i mz-modules\n```\n\nRequire it\n\n```js\nconst mkdirp = require('mz-modules/mkdirp');\n```\n\nYou can also require it from the main entry, but it will load other modules in mz-modules.\n\n```js\nconst mkdirp = require('mz-modules').mkdirp;\n```\n\nUse it\n\n```js\n// Using promise\nmkdirp('/path/to/dir').then(() =\u003e console.log('done'));\n\n// Or if you are using async function\nasync function doSomething() {\n  await mkdirp('/path/to/dir');\n}\n```\n\n**Warning:** nextTick and setImmediate is little slower than callback, because promise queue is after nextTick.\n\n## Modules\n\n- `mz-modules/mkdirp` wrapped [mkdirp]\n- `mz-modules/rimraf` wrapped [rimraf]\n- `mz-modules/glob` wrapped [glob]\n- `mz-modules/sleep` wrapped [ko-sleep]\n- `mz-modules/nextTick` wrapped process.nextTick\n- `mz-modules/setImmediate` wrapped setImmediate\n- `mz-modules/pump` wrapped [pump]\n\n## Contribute\n\nYou can request adding module to mz-modules\n\n1. [Create a issue](https://github.com/node-modules/mz-modules/issues) let us know why you want to add the module.\n1. Add a module, named `xx`\n  - create `xx.js` that exports a function should return promise.\n  - require `xx.js` in `index.js`\n  - add a testcase for it in `test/xx.test.js`\n  - add xx.js to files in `package.json`\n1. Create a pull request\n\n## License\n\n[MIT](LICENSE)\n\n[mz]: https://github.com/normalize/mz\n[mkdirp]: https://github.com/substack/node-mkdirp\n[rimraf]: https://github.com/isaacs/rimraf\n[ko-sleep]: https://github.com/alsotang/ko-sleep\n[glob]: https://github.com/isaacs/node-glob\n[pump]: https://github.com/mafintosh/pump\n","funding_links":[],"categories":["Repository","JavaScript"],"sub_categories":["Control flow"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-modules%2Fmz-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-modules%2Fmz-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-modules%2Fmz-modules/lists"}