{"name":"cb2promise","description":"Converts whatever standard NodeJS callback function into ES6 standard promise.","homepage":"https://github.com/Kikobeats/cb2promise","version":"1.0.5","main":"index.js","author":{"name":"Kiko Beats","email":"josefrancisco.verdu@gmail.com","url":"https://github.com/Kikobeats"},"repository":{"type":"git","url":"git+https://github.com/kikobeats/cb2promise.git"},"bugs":{"url":"https://github.com/Kikobeats/cb2promise/issues"},"keywords":["ES6","callback","cb","converter","promise","standard"],"dependencies":{"pinkie-promise":"~2.0.1","sliced":"~1.0.1"},"devDependencies":{"browserify":"latest","coffee-script":"latest","mocha":"latest","should":"latest","standard":"latest"},"engines":{"node":">= 4"},"files":["dist","index.js"],"scripts":{"test":"sh test/test.sh"},"license":"MIT","gitHead":"9699d7655b07d030fd166cf64f4cba50d6657dda","_id":"cb2promise@1.0.5","_shasum":"1ad713ce6a1bf5ec5cf4b07bda0f8689a41e534c","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},"dist":{"shasum":"1ad713ce6a1bf5ec5cf4b07bda0f8689a41e534c","tarball":"http://registry-npm.ywwl.com/cb2promise/download/cb2promise-1.0.5.tgz","integrity":"sha512-E4LYRBLzKd3oWGLGvuRPZs4IMktULuT6DQU1pP7nMhRBB857B7bhmUZ8mmBnVx08L9wk2o0YPhvhkTZY7LApSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeWyotQ2pQJlvY9tbUVxU554fwGU7ZR1nfSnH4DwHdwAiEA/Q3PUucpn6PfI57inD2wEAqfPaipqThb3KzFDgfsC0k="}],"size":2457,"noattachment":false,"key":"/cb2promise/-/cb2promise-1.0.5.tgz"},"maintainers":[{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/cb2promise-1.0.5.tgz_1488493597332_0.32359861047007143"},"directories":{},"readme":"# cb2promise\n\n![Last version](https://img.shields.io/github/tag/Kikobeats/cb2promise.svg?style=flat-square)\n[![Build Status](https://img.shields.io/travis/Kikobeats/cb2promise/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/cb2promise)\n[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/cb2promise.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/cb2promise)\n[![Dependency status](https://img.shields.io/david/Kikobeats/cb2promise.svg?style=flat-square)](https://david-dm.org/Kikobeats/cb2promise)\n[![Dev Dependencies Status](https://img.shields.io/david/dev/Kikobeats/cb2promise.svg?style=flat-square)](https://david-dm.org/Kikobeats/cb2promise#info=devDependencies)\n[![NPM Status](https://img.shields.io/npm/dm/cb2promise.svg?style=flat-square)](https://www.npmjs.org/package/cb2promise)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/Kikobeats)\n\n> It converts from standard NodeJS callback into a ES2015 Promise.\n\nI use this library across my project for make easy provide API's that works with callback and promise style.\n\n## Install\n\n```bash\nnpm install cb2promise --save\n```\n\n## Bencharmk\n\n```bash\n$ node benchmark.js\n\n# cb2promise\n# 1,2,3,4,5,6,7,8,8,9,10\nok ~2.65 ms (0 s + 2649092 ns)\n\n# pify\n# 1\nok ~912 μs (0 s + 911730 ns)\n\n# es6-promisify\n# 1\nok ~967 μs (0 s + 966663 ns)\n\n# bluebird\n# 1\nok ~3.41 ms (0 s + 3412077 ns)\n\nall benchmarks completed\nok ~7.94 ms (0 s + 7939562 ns)\n```\n\n## Usage\n\n```js\nconst cb2promise = require('cb2promise')\n\nconst callbackFn = function (message, done) {\n  return done(null, message)\n}\n\nconst promise = cb2promise(callbackFn, 'hello world')\n\npromise().then(console.log)\n// => hello world\n```\n\n## License\n\nMIT © [Kiko Beats](http://www.kikobeats.com)\n","publish_time":1488493598005,"_cnpm_publish_time":1488493598005,"dist-tags":{"latest":"1.1.1"}}