{
"_from": "iferr@1.0.2",
"_id": "iferr@1.0.2",
"_inBundle": false,
"_integrity": "sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg==",
"_location": "/npm/iferr",
"_phantomChildren": {},
"_requested": {
"escapedName": "iferr",
"fetchSpec": "1.0.2",
"name": "iferr",
"raw": "iferr@1.0.2",
"rawSpec": "1.0.2",
"registry": true,
"saveSpec": null,
"type": "version"
},
"_requiredBy": [
"#USER",
"/npm"
],
"_resolved": "https://registry.npmjs.org/iferr/-/iferr-1.0.2.tgz",
"_shasum": "e9fde49a9da06dc4a4194c6c9ed6d08305037a6d",
"_shrinkwrap": null,
"_spec": "iferr@1.0.2",
"_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Nadav Ivgi"
},
"bugs": {
"url": "https://github.com/shesek/iferr/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Higher-order functions for easier error handling",
"devDependencies": {
"coffeescript": "^2.3.1",
"mocha": "^4.0.1"
},
"engines": {
"node": ">=6.0.0"
},
"files": [
"iferr.js"
],
"homepage": "https://github.com/shesek/iferr",
"keywords": [
"error",
"errors"
],
"license": "MIT",
"main": "iferr.js",
"name": "iferr",
"optionalDependencies": {},
"readme": "# iferr\n\nHigher-order functions for easier error handling.\n\n`if (err) return cb(err);` be gone!\n\n## Install\n```bash\nnpm install iferr\n```\n\n## Use\n\n### JavaScript/ES6 example\n```js\nvar iferr = require('iferr');\n\nfunction get_friends_count(id, cb) {\n User.load_user(id, iferr(cb, user =>\n user.load_friends(iferr(cb, friends =>\n cb(null, friends.length)\n ))\n ))\n}\n```\n\n### JavaScript/ES5 example\n```js\nvar iferr = require('iferr');\n\nfunction get_friends_count(id, cb) {\n User.load_user(id, iferr(cb, function(user) {\n user.load_friends(iferr(cb, function(friends) {\n cb(null, friends.length)\n }))\n }))\n}\n```\n\n### CoffeeScript example\n```coffee\niferr = require 'iferr'\n\nget_friends_count = (id, cb) ->\n User.load_user id, iferr cb, (user) ->\n user.load_friends iferr cb, (friends) ->\n cb null, friends.length\n```\n\n(TODO: document tiferr, throwerr and printerr)\n\n## License\nMIT\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/shesek/iferr.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.2"
}