{"_id":"thunkify-wrap","_rev":"32-97a303a34406b1587be4703ccd2ca7ee","name":"thunkify-wrap","description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","dist-tags":{"latest":"1.0.4"},"versions":{"0.0.1":{"name":"thunkify-wrap","version":"0.0.1","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{"thunkify":"0.0.1"},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.0.1","dist":{"shasum":"035fb4fdac4f6c92689ec44e9e961a3bddc4334f","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.0.1.tgz","integrity":"sha512-XAuXhB0EfCm/rZlY9fGTmu/iFnGubPxLjqAp1K77/216g/LL1kkMhyH7d9AbMNsmG99F2K2a+pbxjRr9SNpOUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHoSGZAeC8bTBr9+uUVg8SPe9bHaAzuncU6yQNdilWQIAiEAw/FvGYFbdWS4t/uh8zXbgNdy168n24T2KB5gHJRx/YY="}]},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.0.2":{"name":"thunkify-wrap","version":"0.0.2","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*","co":"^3.0.4"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.0.2","dist":{"shasum":"344b9e4c5ab9e124c106e7b9a833a4c48016507a","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.0.2.tgz","integrity":"sha512-bAgO10KGFaHzqkleZt/VgMpK+OLt3+WWPaoNSmCiX9ub8GsPy3TpYC9D4fqaRyOeGvh2P2kd6wK1b0t5Rs8/Mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE05xnDC+iNJ4lRV0C6MAlNZwg0meo/P8uIH9HWrDxSqAiEA1Ay0xDuLHtbyXhO0LNyQi/OioOx1ZgDAF0DJ50U0xw4="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.0.3":{"name":"thunkify-wrap","version":"0.0.3","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.0.3","dist":{"shasum":"8c00f80ea1d8779119863b9e72d06249f132849b","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.0.3.tgz","integrity":"sha512-Sk8u8Hk2QSqw8N+eqSyxcKCQOKJ3uKsAHS2Zb/mlvve8FZTchZUgS5Rgy/IKlf5Pd/0/Lvt3094a5oaCfj8onQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFu2uwmSY1eX3DiRUZNKC5ycSOVkRXsCPWhh7EaKwh4CAiEA4wEEFdwMc5ZEGvxhZR+XI52GoIJw9qZWrXAgkEHxI34="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.0.4":{"name":"thunkify-wrap","version":"0.0.4","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.0.4","dist":{"shasum":"ee1d37a543aec8a4b2faa259143454360074aa90","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.0.4.tgz","integrity":"sha512-DoOzveE8Dhe0D0+Q7bOJTAVJFDnrHDnFDw0vhtXsoLjJLHFmxDvu+x0dbqJeGynbXKukKV55P6xWgAz0hpkR6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlVqok7zU4Qo9Qx6QoE1/S8alKtpxU0E6i0jFqnGsqXAiBopLlNhWhxnlWfua9+4ycqJUarHwAirDAdIJrbNCqtiQ=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.0.5":{"name":"thunkify-wrap","version":"0.0.5","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.0.5","dist":{"shasum":"f564f6821e1e423a9d8916881cf49797e74b5633","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.0.5.tgz","integrity":"sha512-zWFq7B5i4jePPQYZcFUrscXNVQrPioSNkmjriLVJcycEJTMwvDyfirS8Ru04Tp4hncuZqXxbF9kycA/RyjLGOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOxR89ltkv70OvbuO3UndNHq9ExvZUI4LkzR1PEbWRVAiEAzoBR//mSNSZsMWmWE9ufRAvpcNOMJCsvHW6Q5XI7gEQ="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.1.0":{"name":"thunkify-wrap","version":"0.1.0","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.1.0","dist":{"shasum":"36d4137ad1e9b7766d619039c94ec0017e8c4df6","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.1.0.tgz","integrity":"sha512-yXp6WZVIir4KfZd4Cv3rO7LZSl4+O/aGpwvWaYSBmH9T/Xhp81ceM8qHfi6NfdquOEk5ejlg6Bda8Wf8bJBVMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzOvgfLHV97A4XFdh3YQJK2+pGbRgaL4Er+h30D4FciAIhAIjWFQhCbD/mLjEK9DYzEe9S/Co5dM2mLFO4bXoEIpuE"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.1.1":{"name":"thunkify-wrap","version":"0.1.1","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.1.1","dist":{"shasum":"a20942ee4129f6676da4a3278f19039912b8a11a","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.1.1.tgz","integrity":"sha512-xOeaq9jx2Xs1OtrRQ95oeh7ReYtCHVW8oEYu07uZwll9xaMgK0QL8nVCJkWsLDpz1GbguzOrNMaF2Cp4YxUmIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCh3oXFWqPngXY6RNDmhaMM4pTUKJymbYjaBCKABZHRAiEAjNZqjIpnwcHR6LWse7sXNKxiUUFFcCsHcSYIgeNtTHE="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"0.1.2":{"name":"thunkify-wrap","version":"0.1.2","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@0.1.2","dist":{"shasum":"68509b02e32fb0802bfa161a852a18ac8d5cad9e","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-0.1.2.tgz","integrity":"sha512-TX9KFzPwfn0yDJWzfEYMOaduhM6mPkUrwkU4nBFPNAODvrgKxtUunpGjDn9iNzN1zOzUXjN6LeMQbtqdtQ5rwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArrLUGsVOovsq7d9Y8Qbjph71PpAqtlLY1hOaghTG1CAiBMhT5HtX7mvRLQF28zgFgfzyzpN2i/6cMKgMOniVFoEg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"1.0.0":{"name":"thunkify-wrap","version":"1.0.0","repository":{"type":"git","url":"https://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"co-mocha":"*","mocha":"*","should":"*","co":"*"},"license":"MIT","gitHead":"a1161dcd7952e2402b3bbd7b74adb17178f24d63","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@1.0.0","scripts":{},"_shasum":"05605700ab0e7631b31de79e1db0474418eb998b","_from":".","_npmVersion":"1.4.20","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"05605700ab0e7631b31de79e1db0474418eb998b","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-1.0.0.tgz","integrity":"sha512-INTWS7TqcGK/G6Nx0YgN8aiahCzbZwX4XIgGRgM9qwe5thSd7EdqiFH1h1WaOciImaAWsSR66YYqJc6WR1CCxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHd7/TNTst3H9XymV08Qk6yUOd4alPG2ajtUaxRmRwZ2AiA/2kvrhIUIt7WfFelyGRL6GCBNVDpvMgY6KJMh0sB1gw=="}]},"directories":{}},"1.0.1":{"name":"thunkify-wrap","version":"1.0.1","repository":{"type":"git","url":"git://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"co-mocha":"*","mocha":"*","should":"*","co":"*"},"license":"MIT","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@1.0.1","dist":{"shasum":"25ed4b6bd966a0da5b6a17062eeffeea9f5ddb1c","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-1.0.1.tgz","integrity":"sha512-27sdAjU52ACw/icxI/WKpMMRq5AE2kKUhlpJkg9jjr6voifmwujZbMGO4mU7EPqMdr26uLDrq+Bu7lYS7BEU+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKGqbnR3FQ6CyXpPqfdF3ld4He63KcZ//2njETiUIySQIgXgLmyv+sIm/1sPi0aOeRpWmuEOWCywhVhQVFqqeyWk0="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{}},"1.0.2":{"name":"thunkify-wrap","version":"1.0.2","repository":{"type":"git","url":"https://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{},"devDependencies":{"co-mocha":"*","mocha":"*","should":"*","co":"*"},"license":"MIT","gitHead":"642d08bcc4cdfcd7ae648ba635d80e6b5f9a9d9c","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@1.0.2","scripts":{},"_shasum":"b14c7993136cd6f0251a464435a68350bd00925d","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"b14c7993136cd6f0251a464435a68350bd00925d","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-1.0.2.tgz","integrity":"sha512-LiPUeZ0jQNes4hEMvc7+odwJ48QOTfyRhP60leDwpcRu7sD0CzTy9zREeNtU5KbqPRKYRC0fdVyXDAF9NWLurw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCh8UH9y7sez5xvKHz6X9QFWayhX1HREx3iX3BZF/op5wIhAMVRHV9fh48GaygdUj6Jgucw18k5S1mVg3iuq9d/Olkb"}]},"directories":{}},"1.0.3":{"name":"thunkify-wrap","version":"1.0.3","repository":{"type":"git","url":"https://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{"enable":"1"},"devDependencies":{"co-mocha":"*","mocha":"*","should":"*","co":"*"},"license":"MIT","gitHead":"45588314ed8b793f58f5a6aec2aa4b402cf5c12d","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@1.0.3","scripts":{},"_shasum":"fe58b108be36e80fd8b6c586473dfe3a3631aade","_from":".","_npmVersion":"2.0.0-beta.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"fe58b108be36e80fd8b6c586473dfe3a3631aade","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-1.0.3.tgz","integrity":"sha512-lzlr5sEvWhvoMrXdNuwhkCNRI17wcETrKTvDMZ0JBiSzPVNr86JXeZaeAgUZJetSduKvg6Laj/UwlAis8aD63w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzjAv9v24aUKLv+EFSvBj24kJlcXLPvUzybOghHZUeJQIgGSG/oGRlkW002iBnFXUe82lG1rCrTCuOhnShcoLiqEQ="}]},"directories":{}},"1.0.4":{"name":"thunkify-wrap","version":"1.0.4","repository":{"type":"git","url":"https://github.com/dead-horse/node-thunkify-wrap"},"description":"Turn callbacks, arrays, generators, generator functions, and promises into a thunk","keywords":["thunk","co","generator","generators","promise"],"dependencies":{"enable":"1"},"devDependencies":{"co-mocha":"*","mocha":"*","should":"*","co":"*"},"license":"MIT","gitHead":"0f707c8ab518578ae48c04c8e940c34c3e7851d0","bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"homepage":"https://github.com/dead-horse/node-thunkify-wrap","_id":"thunkify-wrap@1.0.4","scripts":{},"_shasum":"b52be548ddfefda20e00b58c6096762b43dd6880","_from":".","_npmVersion":"2.0.0-beta.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"b52be548ddfefda20e00b58c6096762b43dd6880","tarball":"https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-1.0.4.tgz","integrity":"sha512-FNuuz3q6uxhAAI1K8BBTMZE061e7pGMdXOfQdCyiJDSq+YpCVzfLncdGjRMezf+WDFH5JCafupv7c824QnuNag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq7cnXrmAvyHuTG27jP3ZnVS0/8OccMuRp9uA90RvDlQIhALrHl3gfK4HjRaPn6omQHAe2kqAa3XleH2mpGmjRyPd+"}]},"directories":{}}},"readme":"\n# thunkify-wrap [![Build Status](https://secure.travis-ci.org/node-modules/node-thunkify-wrap.svg)](http://travis-ci.org/node-modules/node-thunkify-wrap)\n\n  Turn each node function in an object return a thunk.\n  Turn a regular node function into one which returns a thunk,\n  useful for generator-based flow control such as [co](https://github.com/visionmedia/co).\n\n## Installation\n\n[![NPM](https://nodei.co/npm/thunkify-wrap.svg?downloads=true)](https://nodei.co/npm/thunkify-wrap/)\n\n## Example\n\n```js\n// the same as thunkify\nvar thunkify = require('thunkify-wrap');\nvar fs = require('fs');\n\nfs.readFile = thunkify(fs.readFile);\n\nfs.readFile('package.json', 'utf8')(function(err, str){\n\n});\n\n// thunkfiy an object\nvar user = {\n  add: function () {},\n  show: function () {},\n  list: function () {}\n}\n\nmodule.exports = thunkify(user);\n// module.exports = thunkify(user, ['add', 'show']);\n// module.exports = thunkify(user, 'add');\n```\n\n## genify\n\nWrap every function return a `GeneratorFunction`,\nthat will be easy to write codes in only one way: `yield* fn()`.\n\n```js\nvar genify = require('thunkify-wrap').genify;\nvar fs = require('fs');\n\nfs.readFile = genify(fs.readFile);\n\nvar content = yield* fs.readFile(__filename, 'utf8');\n```\n\n## event support\n\nyou can pass an event object, give end event name list, wrap event to thunk like this\n\n```\nvar e = new EventEmitter();\nvar end = thunkify.event(e, 'finish');\n\nyield end();\nor\nyield.end(['close', 'end']); // will cover `finish` event\n```\n\nwhen specified events emitted, this generator will go on. see more in the source code.\n\n## ctx\n\nalso you can pass `ctx` as contenxt into thunkify, and `thunkify(object)` will use object as the context by default.\n\n```js\nvar thunkify = require('thunkify-wrap');\nvar Cal = function (a, b) {\n  this.a = a;\n  this.b = b;\n};\n\nCal.prototype.plus = function(callback) {\n  var self = this;\n  setTimeout(function () {\n    callback(null, self.a + self.b);\n  }, 5);\n};\n\nCal.prototype.minus = function (callback) {\n  var self = this;\n  setTimeout(function () {\n    callback(null, self.a - self.b);\n  }, 5);\n};\n\nmodule.exports = Cal;\n\nexports.create1 = function (a, b) {\n  return thunkify(new Cal(a, b));\n};\n\n// or\nexports.create2 = function (a, b) {\n  var cal = new Cal(a, b);\n  cal.plus = thunkify(cal.plus, cal);\n  cal.minus = thunkify(cal.minus, cal);\n};\n```\n\n### methods\n\nby pass `methods` list, support only thunkify a part of methods in an object.\n\n```\nexports.create3 = function (a, b) {\n  var cal = new Cal(a, b);\n  thunkify(cal, cal, ['plus']);\n  // or\n  thunkify(cal, ['plus']);\n};\n```\n\n# License\n\n  MIT\n","maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"time":{"modified":"2023-07-12T19:13:49.017Z","created":"2014-02-16T16:30:30.816Z","0.0.1":"2014-02-16T16:30:30.816Z","0.0.2":"2014-02-28T12:52:43.481Z","0.0.3":"2014-02-28T13:40:00.994Z","0.0.4":"2014-03-04T17:14:44.185Z","0.0.5":"2014-03-06T02:24:26.753Z","0.1.0":"2014-03-17T07:52:53.097Z","0.1.1":"2014-03-18T02:36:54.024Z","0.1.2":"2014-05-25T13:02:32.530Z","1.0.0":"2014-07-10T13:12:28.545Z","1.0.1":"2014-07-10T14:56:42.884Z","1.0.2":"2014-07-31T06:43:59.560Z","1.0.3":"2014-10-30T06:24:49.165Z","1.0.4":"2014-11-07T08:34:59.093Z"},"readmeFilename":"Readme.md","homepage":"https://github.com/dead-horse/node-thunkify-wrap","keywords":["thunk","co","generator","generators","promise"],"repository":{"type":"git","url":"https://github.com/dead-horse/node-thunkify-wrap"},"bugs":{"url":"https://github.com/dead-horse/node-thunkify-wrap/issues"},"license":"MIT","users":{"adamlu":true,"iori20091101":true,"flumpus-dev":true}}