{"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"name":"passerror","description":"Simple helper for handling error and success with two different callbacks","version":"0.0.2","repository":{"url":"git://github.com/papandreou/passerror"},"main":"lib/passError.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_id":"passerror@0.0.2","dist":{"shasum":"c43090627b78d39ece96dbc7541f73f73efd9f4a","tarball":"http://registry-npm.ywwl.com/passerror/download/passerror-0.0.2.tgz","integrity":"sha512-vMAu62amXQNrgTZoZagcnj63atr0y/2WNYIhAoRarQOsfEDhu+xYoPT85lK18MEMUnGHpUrIrb+DHMOq8c5HDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaT1EOTz9hhN3pY9R+We3aYNnfNivycSxIVPFhyooMrAiARy5vHQif++YKnqdIZ5oeRLycLVtSaj9evMtNR6CtsXg=="}],"size":1744,"noattachment":false,"key":"/passerror/-/passerror-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"directories":{},"readme":"passError\n=========\n\nHandle success and failure with two different callbacks. Lets you get\nrid of most `if (err) return cb(err);` constructs.\n\n\nExample\n-------\n\nSend errors reported by `fs.readFile` straight to `cb`:\n\n```javascript\nvar passError = require('passerror'),\n    fs = require('fs');\n\nfunction getLines(fileName, cb) {\n    fs.readFile(fileName, 'utf-8', passError(cb, function (contents) {\n        cb(null, contents.split(/\\r?\\n|\\n?\\r/));\n    }));\n}\n```\n\n\nLicense\n-------\n\nLicensed under a standard 3-clause BSD license -- see the\n`LICENSE`-file for details.\n","publish_time":1362665482411,"_cnpm_publish_time":1362665482411,"dist-tags":{"latest":"1.1.1"}}