{"name":"node-promise-es6","version":"0.0.1","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.5.4","fs-promise":"^0.3.1","fs-extra":"^0.18.4","child-process-promise":"^1.1.0"},"devDependencies":{"dist-es6":"^0.0.3","jasmine-es6":"^0.0.4","eslint-defaults":"^0.0.2"},"_id":"node-promise-es6@0.0.1","_shasum":"e9fb628535911440aac58d0d118eb35770d2c239","_from":"dist","_resolved":"file:dist","_npmVersion":"2.11.0","_nodeVersion":"0.12.4","_npmUser":{"name":"vinsonchuong","email":"vinsonchuong@gmail.com"},"dist":{"shasum":"e9fb628535911440aac58d0d118eb35770d2c239","tarball":"http://registry-npm.ywwl.com/node-promise-es6/download/node-promise-es6-0.0.1.tgz","integrity":"sha512-bo7b2SBdOXomYIe8qXv0ejkx0u5uxtu0VYcX2pt70/8K41oM3SOxdUmasC+1cHCF0hyPa5WhgNepyiKJ6iEH4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqWW3dGj9L9lTwyfA29aWiM3fTS+mKst2s0I9TL4bnvAiByaPlBRe8LAf1ICM7s55qHvGYeTnjDDwHfySG/sy2qMQ=="}],"size":2640,"noattachment":false,"key":"/node-promise-es6/-/node-promise-es6-0.0.1.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":1433700995891,"_cnpm_publish_time":1433700995891,"dist-tags":{"latest":"0.3.2"}}