{"_id":"asyncify","_rev":"8-670603e8c644f34446b57e20c06efb22","name":"asyncify","description":"The asyncify deferred module of FuturesJS (Ender.JS and Node.JS)","dist-tags":{"latest":"2.1.2"},"versions":{"2.1.1":{"name":"asyncify","version":"2.1.1","description":"The asyncify deferred module of FuturesJS (Ender.JS and Node.JS)","homepage":"https://github.com/coolaj86/futures","keywords":["flow-control","async","asynchronous","asyncify","util","browser"],"repository":{"type":"git","url":"git://github.com/coolaj86/futures.git"},"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"main":"asyncify.js","directories":{"lib":"."},"dependencies":{"future":"*"},"engines":{"node":"*","ender":">= 0.5.0"},"_npmJsonOpts":{"file":"/Users/coolaj86/.npm/asyncify/2.1.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"asyncify@2.1.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"37ca5875abfc0388a154e0995cb06160ff55be88","tarball":"https://registry.npmjs.org/asyncify/-/asyncify-2.1.1.tgz","integrity":"sha512-lg460ZOqv8lPSQ9ktRUwrlVKrD4Ae5qFJ8S5+NuKncgexbKtQjDEaIka2Kh2a80j/Q9WRKyCXLVKG8LiKUAbng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVCN7bcJjKwmq4aCf5LDx1AmbtrG4N7U2N4kZARCa1hAIhAKPghsTwBs5AYBKI/J5SAliJsVVfuSNcfbJVm1lUWQQp"}]},"scripts":{}},"2.1.2":{"name":"asyncify","version":"2.1.2","description":"The asyncify deferred module of FuturesJS (Ender.JS and Node.JS)","homepage":"https://github.com/coolaj86/futures","keywords":["flow-control","async","asynchronous","asyncify","util","browser"],"repository":{"type":"git","url":"git://github.com/coolaj86/futures.git"},"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"main":"asyncify.js","directories":{"lib":"."},"dependencies":{"future":"2.x"},"engines":{"node":"*","ender":">= 0.5.0"},"bugs":{"url":"https://github.com/coolaj86/futures/issues"},"_id":"asyncify@2.1.2","dist":{"shasum":"3405652a7026acef28a89e618fe6ef0a6ce58def","tarball":"https://registry.npmjs.org/asyncify/-/asyncify-2.1.2.tgz","integrity":"sha512-WfbrNmdAV3LPNooqRAWu+u3eUgVe/dO3yMd2+3L0FlfkYBakrTXg+sgou6e7U6dl/K33c3eqJj/MupcTI/a3EA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhprH0RWkJHWdNlDdDTRkBBXOhbq65gKaeKqufuR50hgIgKU1CerFPuOS8qOHslglBvm1HLsLOldlE4PIz7NVye54="}]},"_from":"./","_npmVersion":"1.3.11","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}]}},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"time":{"modified":"2022-06-13T03:39:00.577Z","created":"2011-07-13T20:17:16.849Z","2.1.1":"2011-07-13T20:17:17.218Z","2.1.2":"2014-01-13T18:16:18.956Z"},"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"repository":{"type":"git","url":"git://github.com/coolaj86/futures.git"},"readme":"asyncify()\n----\n\n  * `doStuff = Futures.asyncify(doStuffSync)` - returns a fuction with the same signature which catches errors and returns a future rather than the synchronous data.\n\n**Example:**\n\n    function doStuffSync = function (params) {\n      throw new Error(\"Error of some sort\");\n      return \"Hello\";\n    }\n\n    var doStuff = Futures.asyncify(doStuffSync);\n\n    doStuff.whenever(function (err, data) {\n      console.log(err, data);\n    });\n\n    doStuff();\n    doStuff();\n    doStuff().when(function (err, data) {\n      if (err) {\n        throw err;\n      }\n      console.log(data);\n    });\n","readmeFilename":"README.md"}