{"name":"node-promise-es6","version":"0.0.4","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.20.1","child-process-promise":"^1.1.0","babel-runtime":"5.6.14"},"devDependencies":{"dist-es6":"^0.0.14","jasmine-es6":"^0.0.14","eslint-defaults":"^0.0.8"},"_id":"node-promise-es6@0.0.4","_shasum":"41f8726a9763af0fc520738650716cf6a48af0b3","_from":"dist","_resolved":"file:dist","_npmVersion":"2.11.3","_nodeVersion":"0.12.4","_npmUser":{"name":"vinsonchuong","email":"vinsonchuong@gmail.com"},"dist":{"shasum":"41f8726a9763af0fc520738650716cf6a48af0b3","tarball":"http://registry-npm.ywwl.com/node-promise-es6/download/node-promise-es6-0.0.4.tgz","integrity":"sha512-THkftOR0B+CHn6FTL/OQ0Hna+KEXCdvc2KzwvlsjhwQ9QCfiUmR9CQeBKUuXacwGR/9hO9AEA9J4g2Qtto+Etg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFYIMEMmZnovFzOK6kc64jjtHuF5iAd7d2Jntuch0eg/AiEA8V1tw4OmD5U+/dbdx133k4dNW4X6k5XI3IyR1A/LhJs="}],"size":2647,"noattachment":false,"key":"/node-promise-es6/-/node-promise-es6-0.0.4.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":1435374799926,"_cnpm_publish_time":1435374799926,"dist-tags":{"latest":"0.3.2"}}