{"name":"node-promise-es6","version":"0.0.5","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":{"fs-promise":"^0.3.1","fs-extra":"^0.22.1","child-process-promise":"^1.1.0","babel-runtime":"5.6.14"},"devDependencies":{"dist-es6":"^0.0.16","jasmine-es6":"^0.0.16","eslint-defaults":"^0.0.10"},"_id":"node-promise-es6@0.0.5","_shasum":"0fbf88b5f02768bc51164c16b6a88b7613c83d1e","_from":"dist","_resolved":"file:dist","_npmVersion":"2.13.1","_nodeVersion":"0.12.7","_npmUser":{"name":"vinsonchuong","email":"vinsonchuong@gmail.com"},"dist":{"shasum":"0fbf88b5f02768bc51164c16b6a88b7613c83d1e","tarball":"http://registry-npm.ywwl.com/node-promise-es6/download/node-promise-es6-0.0.5.tgz","integrity":"sha512-vhhXMEUBskiplvKobGrFLO0vTSA+HxvAlhnTcNgROV8YDPqoe1FxDYnzZqSaGn7Rbd7NnCbTXijl9DshR39FIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqQjh8FakUIU1ZeOf0iNjDncPhsn/ucShMpZWuazJVRwIgIcpcWXtLh26pzwpWtydZNR54aSxHbYDSCSAhIzgDeWE="}],"size":2644,"noattachment":false,"key":"/node-promise-es6/-/node-promise-es6-0.0.5.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":1437537357033,"_cnpm_publish_time":1437537357033,"dist-tags":{"latest":"0.3.2"}}