{"name":"node-promise-es6","version":"0.2.3","description":"An ES6 promise adapter for the Node.js API for use with ES7 async/await","keywords":["es6","promise"],"homepage":"https://github.com/vinsonchuong/node-promise-es6","bugs":{"url":"https://github.com/vinsonchuong/node-promise-es6/issues"},"license":"MIT","author":{"name":"Vinson Chuong","email":"vinsonchuong@gmail.com"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/vinsonchuong/node-promise-es6.git"},"scripts":{"test":"eslint && jasmine"},"dependencies":{"babel-runtime":"<= 5.8.23"},"devDependencies":{"dist-es6":"^0.0.19","jasmine-es6":"^0.0.18","eslint-defaults":"^0.1.4"},"_id":"node-promise-es6@0.2.3","_shasum":"9c37cf9d68a53f2d49f951df3c05c1282929deb4","_from":"dist","_resolved":"file:dist","_npmVersion":"3.3.6","_nodeVersion":"4.1.2","_npmUser":{"name":"vinsonchuong","email":"vinsonchuong@gmail.com"},"dist":{"shasum":"9c37cf9d68a53f2d49f951df3c05c1282929deb4","tarball":"http://registry-npm.ywwl.com/node-promise-es6/download/node-promise-es6-0.2.3.tgz","integrity":"sha512-e/tqyF8nUjUqqnV4j69uAg79tMsb+I0oThKn5ecwCMOVBrGcysVxMFudPBfaYE3qd2BdqKAWhHbcTvEqklCgNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZ0FKKRQyrmMVw6DBCxYYq5m6iV7awxxwG8HwZ/UrXtAiEAvnwpK7eFciBsYtj3p9CeKqIEfL6JSVwOQwyxCNxcchw="}],"size":3063,"noattachment":false,"key":"/node-promise-es6/-/node-promise-es6-0.2.3.tgz"},"maintainers":[{"name":"vinsonchuong","email":"vinsonchuong@gmail.com"}],"directories":{},"readme":"# node-promise-es6\n[![Build Status](https://travis-ci.org/vinsonchuong/node-promise-es6.svg?branch=master)](https://travis-ci.org/vinsonchuong/node-promise-es6)\n\nES6 promise adapters for the [Node.js API](https://nodejs.org/api/) for use\nwith [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait).\n\n## Installing\n`node-promise-es6` is available as an\n[npm package](https://www.npmjs.com/package/node-promise-es6).\n\n## Usage\n\n### Wrapped APIs\n\n#### fs\n```js\nimport {fs} from 'node-promise-es6';\n\nasync function run() {\n  console.log(await fs.readdir('.'));\n}\n```\n\n#### child_process\n```js\nimport {childProcess} from 'node-promise-es6';\n\nasync function run() {\n  const {stdout, stderr} = await childProcess.exec('ls .');\n  console.log(stdout, stderr);\n}\n```\n\n### Utilities\n\n#### promisify\n```js\nimport {promisify} from 'node-promise-es6';\n\nfunction callbackFn(x, y, callback) {\n  callback(null, x, y);\n}\n\nasync function run() {\n  const promiseFn = promisify(callbackFn, ['x', 'y']);\n  const {x, y} = await promiseFn(1, 2);\n  console.log(x === 1 && y === 2);\n}\n```\n\nA helper for wrapping Node.js-style callback-taking functions (error object as\nfirst argument) in a Promise API.\n\n## Development\n### Getting Started\nThe application requires the following external dependencies:\n* Node.js\n\nThe rest of the dependencies are handled through:\n```bash\nnpm install\n```\n\nRun tests with:\n```bash\nnpm test\n```\n","publish_time":1444703099109,"_cnpm_publish_time":1444703099109,"dist-tags":{"latest":"0.3.2"}}