{"name":"node-promise-es6","version":"0.1.0","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.18","jasmine-es6":"^0.0.18","eslint-defaults":"^0.1.4"},"_id":"node-promise-es6@0.1.0","_shasum":"f3a57d15c85c9a1e4585abe572af28cd79e160ee","_from":"dist","_resolved":"file:dist","_npmVersion":"3.3.5","_nodeVersion":"4.1.1","_npmUser":{"name":"vinsonchuong","email":"vinsonchuong@gmail.com"},"dist":{"shasum":"f3a57d15c85c9a1e4585abe572af28cd79e160ee","tarball":"http://registry-npm.ywwl.com/node-promise-es6/download/node-promise-es6-0.1.0.tgz","integrity":"sha512-S3taK68nQ+f30VyhLHDRInap9s4dBpZMvHlLWZmQFX3Q01KqluhE5V2hiL3Zub/aodDvT6XfNDuv8UW8XEMkAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDAK5iJ0SweEWlFBB/tMeMPUGZ5TvxM6HnjNJikJAEuHAiBKWmn3+hqVCtd46bbBHJL8HkFR2U1uldAoRLlhYm2+ow=="}],"size":2915,"noattachment":false,"key":"/node-promise-es6/-/node-promise-es6-0.1.0.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":1444421269222,"_cnpm_publish_time":1444421269222,"dist-tags":{"latest":"0.3.2"}}