{"name":"native-promisify","version":"0.3.0","description":"convert callback function to promise only use native promise","main":"index.js","directories":{"test":"test"},"scripts":{"test":"_mocha -R spec -t 50 test/*.js","test-cov":"node node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -R dot -t 50 test/*.js","test-travis":"node node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- -R dot -t 50 test/*.js"},"repository":{"type":"git","url":"https://github.com/coderhaoxin/native-promisify.git"},"keywords":["promisify","callback","promise","native","es6"],"files":["index.js","Readme.md"],"engines":{"node":">= 0.11.13"},"author":{"name":"haoxin"},"license":"MIT","bugs":{"url":"https://github.com/coderhaoxin/native-promisify/issues"},"homepage":"https://github.com/coderhaoxin/native-promisify","devDependencies":{"istanbul":"^0.3.2","mocha":"^1.21.5"},"gitHead":"c6f2d4ca29fe3fd5dbca68ff037980dbaa2f4fe8","_id":"native-promisify@0.3.0","_shasum":"fd99282967ba7d29764646dcd7e9a8b7cce06472","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"},"maintainers":[{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"}],"dist":{"shasum":"fd99282967ba7d29764646dcd7e9a8b7cce06472","tarball":"http://registry-npm.ywwl.com/native-promisify/download/native-promisify-0.3.0.tgz","integrity":"sha512-B2U7gnVQoMsqfx2D9rizoMWJtqgKm9F/O46pfB+MjZxIt5QE3olQ8qOLUzxCOaTn4BZgz2b2Fahth2EDlB6AjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFc0iQDhgCrmALt/RxWlPJEwMDQCp6aOn7zaRXqaneIqAiAoTBz6VTtyeorwRJgHZ543FLBkU+tSq4NGSjcVIdmNsA=="}],"size":1195,"noattachment":false,"key":"/native-promisify/-/native-promisify-0.3.0.tgz"},"readme":"### Deprecated, please use [thenify](https://github.com/thenables/thenify) or [thenify-all](https://github.com/thenables/thenify-all)\n\n[![NPM version][npm-img]][npm-url]\n[![Build status][travis-img]][travis-url]\n[![Test coverage][coveralls-img]][coveralls-url]\n[![License][license-img]][license-url]\n[![Dependency status][david-img]][david-url]\n\n### native-promisify\n\n```js\nvar promisify = require('native-promisify');\n```\n\n* promisify function\n\n```js\nfunction fn(ms, cb) {\n  setTimeout(cb(null, ms), ms);\n}\n\nvar p = promisify(fn);\n\np(10).then(function(ms) {\n  console.log('delay: %d', ms);\n});\n```\n\n* promisify object\n\n```js\nvar obj = {\n  name: 'hello',\n  show: fun1,\n  tell: fun2,\n  ping: fun3\n};\n\n// promisify all functions (exclude generator function) of the object\npromisify(origin);\n\n// only promisify `show`, `tell`\npromisify(origin, ['show', 'tell']);\n\n// filter function\npromisify(origin, function(key) {\n  return key === 'ping';\n});\n```\n\n### License\nMIT\n\n[npm-img]: https://img.shields.io/npm/v/native-promisify.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/native-promisify\n[travis-img]: https://img.shields.io/travis/coderhaoxin/native-promisify.svg?style=flat-square\n[travis-url]: https://travis-ci.org/coderhaoxin/native-promisify\n[coveralls-img]: https://img.shields.io/coveralls/coderhaoxin/native-promisify.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/coderhaoxin/native-promisify?branch=master\n[license-img]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square\n[license-url]: http://opensource.org/licenses/MIT\n[david-img]: https://img.shields.io/david/coderhaoxin/native-promisify.svg?style=flat-square\n[david-url]: https://david-dm.org/coderhaoxin/native-promisify\n","publish_time":1413112388905,"_cnpm_publish_time":1413112388905,"dist-tags":{"latest":"1.2.0"}}