{"name":"mz","description":"modernize node.js to current ECMAScript standards","version":"2.2.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/normalize/mz.git"},"dependencies":{"native-or-bluebird":"1","object-assign":"^4.0.1","thenify-all":"1"},"devDependencies":{"istanbul":"0","bluebird":"2","mocha":"2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js","child_process.js","crypto.js","dns.js","fs.js","readline.js","zlib.js"],"gitHead":"a1e3a8d721ad873c07915ba0da39df9d992670a1","bugs":{"url":"https://github.com/normalize/mz/issues"},"homepage":"https://github.com/normalize/mz#readme","_id":"mz@2.2.0","_shasum":"530dbef09c2b27c58fd752345132c94c47f2015a","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"530dbef09c2b27c58fd752345132c94c47f2015a","tarball":"http://registry-npm.ywwl.com/mz/download/mz-2.2.0.tgz","integrity":"sha512-CFqBmo9WcIkIV6gZWI4aag1/t+KSyUSNCn3r4Jv0AQgi31R8WuMKP0H/Uub7Wufel8TM/hpNhrG+CJkmBPAa7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5vjI4+aKzGjdYe5A8X2S/aepxXPGgmP/JD0ClUWxKrwIgI60RWt6u/i6atpvCNSkMOYW3NALfLtIZchzlVeSPIOU="}],"size":3937,"noattachment":false,"key":"/mz/-/mz-2.2.0.tgz"},"maintainers":[{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"linusu","email":"linus@folkdatorn.se"},{"name":"rstacruz","email":"dropbox@ricostacruz.com"},{"name":"swatinem","email":"arpad.borsos@googlemail.com"}],"directories":{},"readme":"\n# MZ - Modernize node.js\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nModernize node.js to current ECMAScript specifications!\nnode.js will not update their API to ES6+ [for a while](https://github.com/joyent/node/issues/7549).\nThis library is a wrapper for various aspects of node.js' API.\n\n## Installation and Usage\n\nSet `mz` as a dependency and install it.\n\n```bash\nnpm i mz\n```\n\nThen prefix the relevant `require()`s with `mz/`:\n\n```js\nvar fs = require('mz/fs')\n\nfs.exists(__filename).then(function (exists) {\n  if (exists) // do something\n})\n```\n\nWith ES2017, this will allow you to use async functions cleanly with node's core API:\n\n```js\nconst fs = require('mz/fs')\n\n\nasync function doSomething () {\n  if (await fs.exists(__filename)) // do something\n}\n```\n\n## Promisification\n\nMany node methods are converted into promises.\nAny properties that are deprecated or aren't asynchronous will simply be proxied.\nThe modules wrapped are:\n\n- `child_process`\n- `crypto`\n- `dns`\n- `fs` (uses `graceful-fs` if available)\n- `readline`\n- `zlib`\n\n```js\nvar exec = require('mz/child_process').exec\n\nexec('node --version').then(function (stdout) {\n  console.log(stdout)\n})\n```\n\n## Promise Engine\n\n`mz` uses [`any-promise`](https://github.com/kevinbeaty/any-promise).\n\n## FAQ\n\n### Can I use this in production?\n\nYes, Node 4.x ships with stable promises support. For older engines,\nyou should probably install your own promise implementation and register it with\n`require('any-promise/register')('bluebird')`.\n\n### Will this make my app faster?\n\nNope, probably slower actually.\n\n### Can I add more features?\n\nSure.\nOpen an issue.\n\nCurrently, the plans are to eventually support:\n\n- New APIs in node.js that are not available in older versions of node\n- ECMAScript7 Streams\n\n[bluebird]: https://github.com/petkaantonov/bluebird\n\n[npm-image]: https://img.shields.io/npm/v/mz.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/mz\n[github-tag]: http://img.shields.io/github/tag/normalize/mz.svg?style=flat-square\n[github-url]: https://github.com/normalize/mz/tags\n[travis-image]: https://img.shields.io/travis/normalize/mz.svg?style=flat-square\n[travis-url]: https://travis-ci.org/normalize/mz\n[coveralls-image]: https://img.shields.io/coveralls/normalize/mz.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/normalize/mz?branch=master\n[david-image]: http://img.shields.io/david/normalize/mz.svg?style=flat-square\n[david-url]: https://david-dm.org/normalize/mz\n[license-image]: http://img.shields.io/npm/l/mz.svg?style=flat-square\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/mz.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/mz\n","publish_time":1453641306076,"_cnpm_publish_time":1453641306076,"dist-tags":{"latest":"2.7.0"}}