{"_id":"promise2thunk","_rev":"19-dcf70ed37e68e23d619802f6a329c6e9","name":"promise2thunk","description":"Convert (transform) promise to thunk, just like was in co@3","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"promise2thunk","version":"0.0.0","description":"Convert promise to thunk, just like was in co@3","repository":{"type":"git","url":"git+https://github.com/tunnckocore/promise2thunk.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{},"devDependencies":{"assertit":"^0.1.0"},"keywords":[],"bugs":{"url":"https://github.com/tunnckocore/promise2thunk/issues"},"homepage":"https://github.com/tunnckocore/promise2thunk#readme","_id":"promise2thunk@0.0.0","_shasum":"667bbce12ad91b41a9e117ed9d4f927ca54b4de5","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"667bbce12ad91b41a9e117ed9d4f927ca54b4de5","tarball":"https://registry.npmjs.org/promise2thunk/-/promise2thunk-0.0.0.tgz","integrity":"sha512-P9nGJ3L0VCEblf1kjxZKulSbm8gbR6zozx3NajFJ6Rn/ETQnkUAN3eck38/Ub8YxH/1n3DlI0AjHUp/VT81CSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAYoHJkkWQxPApMa+CBAd26COkhpMVWJeHBGBTSCMIiIAiBTHLE7KhaPyx5sPcyOnv1B9ZrgOWAi3VuWk1kR4XaSLQ=="}]},"directories":{}},"1.0.0":{"name":"promise2thunk","version":"1.0.0","description":"Convert (transform) promise to thunk, just like was in co@3","repository":{"type":"git","url":"git+https://github.com/tunnckocore/promise2thunk.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-promise":"~2.0.0"},"devDependencies":{"assertit":"^0.1.0","bluebird":"^2.9.27","then-parse-json":"^1.0.2"},"keywords":["co","convert","promise","promisify","thunk","thunkify","transform","util"],"gitHead":"c1a66ffd4c4b69cb18a64fca5bab2eeb2cd6c5b3","bugs":{"url":"https://github.com/tunnckocore/promise2thunk/issues"},"homepage":"https://github.com/tunnckocore/promise2thunk#readme","_id":"promise2thunk@1.0.0","_shasum":"61c9610d0763b6f3562ecaebbea392f86a87675a","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"61c9610d0763b6f3562ecaebbea392f86a87675a","tarball":"https://registry.npmjs.org/promise2thunk/-/promise2thunk-1.0.0.tgz","integrity":"sha512-qf79TT7F+f3lKYRx7uZh+0G7vZRrlCcEXDFNafiPmuEQApibvZ/txP9k5dt7fC3GRArvBDBe98KHYaw7Ay5U+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8t8I4wFHLX3hj/azzf2K3F5FpskugkCRls9veyOJG3AiEAlObfrzcoN+EkYC/V2BOMKD/N+MSFVAcWX29d78rN/UA="}]},"directories":{}},"1.0.1":{"name":"promise2thunk","version":"1.0.1","description":"Convert (transform) promise to thunk, just like was in co@3","repository":{"type":"git","url":"git+https://github.com/tunnckocore/promise2thunk.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-promise":"~2.1.0"},"devDependencies":{"assertit":"^0.1.0","bluebird":"^2.9.27","then-parse-json":"^1.0.2"},"keywords":["co","convert","promise","promisify","thunk","thunkify","transform","util"],"gitHead":"14f3001e6596ea83e539d49156b9d3920a4a1997","bugs":{"url":"https://github.com/tunnckocore/promise2thunk/issues"},"homepage":"https://github.com/tunnckocore/promise2thunk#readme","_id":"promise2thunk@1.0.1","_shasum":"476db7fcb2b4d2dcb1c0f003d37847e4461a22a0","_from":".","_npmVersion":"3.3.2","_nodeVersion":"4.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"476db7fcb2b4d2dcb1c0f003d37847e4461a22a0","tarball":"https://registry.npmjs.org/promise2thunk/-/promise2thunk-1.0.1.tgz","integrity":"sha512-OHwpWMTd9DcG+8NcCoFQi8VG2sCCZP7JR0iYhXqV0HWpCkStmAS7rSMTTEYS8WgGTNS5tBeob4eKZAUrmfiI0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4B72a7GL5vqMnThwr1z1IBub2P6cJaSGXVpUXMz0+YAiBek+TQ/4vb6+r8ektLT4CVINUxbsmddWcE0Ridtz4Qhw=="}]},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"directories":{}}},"readme":"# promise2thunk [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> Convert (transform) promise to thunk, just like was in co@3\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n\n## Install\n```\nnpm i promise2thunk --save\nnpm test\n```\n\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nvar promise2thunk = require('promise2thunk')\nvar parseJson = require('then-parse-json')\n\nvar promise = parseJson('{\"foo\":\"bar\"}')\nvar thunk = promise2thunk(promise)\n\nthunk(function (err, res) {\n  console.log(err) //=> null\n  console.log(res) //=> { foo: 'bar' }\n})\n```\n\n\n## Related\n- [always-promise](https://github.com/tunnckocore/always-promise): Create Bluebird Promise from given async or synchronous function. It automatically convert sync functions to async, then to promise.\n- [always-callback](https://github.com/tunnckocore/always-callback#readme): Create callback api for given sync function. Guarantee that given function (sync or async, no matter) will always have callback api and will handle errors correctly.\n- [make-callback](https://github.com/tunnckocore/make-callback): Make synchronous function to support callback api\n- [handle-callback](https://github.com/hybridables/handle-callback): Initial step for creating hybrid APIs, used by `hybridify`. Handle callback in promise - give promise and callback return promise.\n- [handle-arguments](https://github.com/hybridables/handle-arguments): Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow.\n- [manage-arguments](https://github.com/tunnckocore/manage-arguments): Prevents arguments leakage - managing arguments. From Optimization killers by Petka Antonov.\n- [is-async-function](https://github.com/tunnckocore/is-async-function): Check that given function is async (callback) function or not. Trying to guess that based on check if `callback` or `cb` exists in function arguments.\n- [is-es6-generators](https://github.com/tunnckocore/is-es6-generators): Check whether a value is a `Generator` or `GeneratorFunction`. The `co` way, more strict checking. Always return boolean true or false, never null or undefined.\n\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/promise2thunk/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckocore.tk][author-www-img]][author-www-url] [![keybase tunnckocore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n\n[npmjs-url]: https://www.npmjs.com/package/promise2thunk\n[npmjs-img]: https://img.shields.io/npm/v/promise2thunk.svg?label=promise2thunk\n\n[license-url]: https://github.com/tunnckoCore/promise2thunk/blob/master/LICENSE.md\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n\n[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/promise2thunk\n[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/promise2thunk.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/promise2thunk\n[travis-img]: https://img.shields.io/travis/tunnckoCore/promise2thunk.svg\n\n[coveralls-url]: https://coveralls.io/r/tunnckoCore/promise2thunk\n[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/promise2thunk.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/promise2thunk\n[david-img]: https://img.shields.io/david/tunnckoCore/promise2thunk.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/messages\n[new-message-img]: https://img.shields.io/badge/send%20me-message-green.svg\n","maintainers":[{"email":"super.ludiq@gmail.com","name":"vanchoy"},{"email":"mameto2011@gmail.com","name":"tunnckocore"}],"time":{"modified":"2022-06-24T19:21:38.403Z","created":"2015-06-05T07:57:16.927Z","0.0.0":"2015-06-05T07:57:16.927Z","1.0.0":"2015-06-05T08:46:40.472Z","1.0.1":"2015-09-10T10:20:01.719Z"},"homepage":"https://github.com/tunnckocore/promise2thunk#readme","keywords":["co","convert","promise","promisify","thunk","thunkify","transform","util"],"repository":{"type":"git","url":"git+https://github.com/tunnckocore/promise2thunk.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"bugs":{"url":"https://github.com/tunnckocore/promise2thunk/issues"},"license":"MIT","readmeFilename":"README.md"}