{"_id":"cpsenize","_rev":"4-c964d7946d560a58f97218fb2839f762","name":"cpsenize","description":"Wraps synchronous functions with a cps (callback passing style) function","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"cpsenize","version":"1.0.0","description":"Wraps synchronous functions with a cps (callback passing style) function","main":"index.js","scripts":{"test":"node ./tests"},"repository":{"type":"git","url":"git+https://github.com/MauriceButler/cpsenize.git"},"author":{"name":"Maurice Butler","email":"maurice.butler@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/MauriceButler/cpsenize/issues"},"homepage":"https://github.com/MauriceButler/cpsenize#readme","keywords":["callback","passing","style","cb","cps","sync","async","wrap","wrapper","function","method","error","catch"],"gitHead":"90f203836d263d88b484bbde39253201a6f822b8","_id":"cpsenize@1.0.0","_shasum":"76e0352120726aaf5aa9160a4baee5e6727de0d3","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"mauricebutler","email":"maurice.butler@gmail.com"},"maintainers":[{"name":"mauricebutler","email":"maurice.butler@gmail.com"}],"dist":{"shasum":"76e0352120726aaf5aa9160a4baee5e6727de0d3","tarball":"https://registry.npmjs.org/cpsenize/-/cpsenize-1.0.0.tgz","integrity":"sha512-DDbDeOrbN91+d24/CYiMgcOTweaBcOn7Gk+mFsgwzVtVz/iC7u7Sh1ISvUjMhAW154MTSLMjXan+IdZ4EwUIfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgapIKkH7vdZB3+C7NEX8fqTK2Czhdj2uSifja3NSffgIgNnl4SkjufaWoXpJGB8i/FqiTP7IrLr6Ry/0956dgfHo="}]}},"2.0.0":{"name":"cpsenize","version":"2.0.0","description":"Wraps synchronous functions with a cps (callback passing style) function","main":"index.js","scripts":{"test":"node ./tests"},"repository":{"type":"git","url":"git+https://github.com/MauriceButler/cpsenize.git"},"author":{"name":"Maurice Butler","email":"maurice.butler@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/MauriceButler/cpsenize/issues"},"homepage":"https://github.com/MauriceButler/cpsenize#readme","keywords":["callback","passing","style","cb","cps","sync","async","wrap","wrapper","function","method","error","catch"],"devDependencies":{"tape":"^4.2.1"},"gitHead":"5b7a9afd947d4ac543aec5aff3da78b57d9b8a8f","_id":"cpsenize@2.0.0","_shasum":"4b1311f9da3b84ca2104df3f22d1953d4beb6f88","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.6","_npmUser":{"name":"mauricebutler","email":"maurice.butler@gmail.com"},"dist":{"shasum":"4b1311f9da3b84ca2104df3f22d1953d4beb6f88","tarball":"https://registry.npmjs.org/cpsenize/-/cpsenize-2.0.0.tgz","integrity":"sha512-ozyq8Y1fRkpX3Gl0NVGlefIt6AYpohzf+olhiGh83uho6oEoHS3I4hoVs6sqt92w7i7F8ySvmBowPYbpNniENw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTgu7pG+WkQ73t3YCTRvPsnMVa8VEwxtIEWqi1juFaXAiB7D3bdOyOUA14veew0RDbivjncjYimhFq0xEHcwvcu8Q=="}]},"maintainers":[{"name":"mauricebutler","email":"maurice.butler@gmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/cpsenize-2.0.0.tgz_1455772149754_0.825034823268652"}}},"readme":"# cpsenize\n\nWraps synchronous functions with a cps (callback passing style) function\n\n\n``` javascript\n\nvar cpsenize = require('cpsenize');\n\nfunction add(a, b){\n    return a + b;\n}\n\nvar cpsAdd = cpsenize(add);\n\ncpsAdd(5, 6, function(error, result){\n    console.log(result); // 11\n});\n\n\n```\n\nAdditionally can also return errors if the function throws\n\n``` javascript\n\nvar cpsenize = require('cpsenize');\n\nfunction add(a, b){\n    throw new Error('BANG!!!');\n}\n\nvar cpsAdd = cpsenize(add, true);\n\ncpsAdd(5, 6, function(error, result){\n    console.log(error); // BANG!!!\n});\n\n\n```","maintainers":[{"name":"mauricebutler","email":"maurice.butler@gmail.com"}],"time":{"modified":"2022-06-14T02:22:25.315Z","created":"2015-10-13T01:18:27.404Z","1.0.0":"2015-10-13T01:18:27.404Z","2.0.0":"2016-02-18T05:09:11.930Z"},"homepage":"https://github.com/MauriceButler/cpsenize#readme","keywords":["callback","passing","style","cb","cps","sync","async","wrap","wrapper","function","method","error","catch"],"repository":{"type":"git","url":"git+https://github.com/MauriceButler/cpsenize.git"},"author":{"name":"Maurice Butler","email":"maurice.butler@gmail.com"},"bugs":{"url":"https://github.com/MauriceButler/cpsenize/issues"},"license":"MIT","readmeFilename":"README.md"}