{"_id":"custom-error","_rev":"15-2f5e569859f954708e0ba6ab1707b29c","name":"custom-error","description":"Create custom errors that inherit Error","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"custom-error","version":"0.1.0","author":{"name":"Andre Z. Sanchez"},"description":"Create custom errors that inherit Error","main":"index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tape":"~2.13.3","tap-spec":"~0.2.0"},"scripts":{"test":"tape test/*.js | ./node_modules/.bin/tap-spec"},"keywords":["error","inherit","prototype"],"repository":{"type":"git","url":"git://github.com/AndreZSanchez/custom-error.git"},"homepage":"https://github.com/AndreZSanchez/custom-error","license":"MIT","bugs":{"url":"https://github.com/AndreZSanchez/custom-error/issues"},"_id":"custom-error@0.1.0","dist":{"shasum":"b3967433ceb82c7d1357eb9c5e32dbfcf002257a","tarball":"https://registry.npmjs.org/custom-error/-/custom-error-0.1.0.tgz","integrity":"sha512-SmqcuyOIwPWTuQd8ojDwnLN8942EbjONkJCQEzyi7jt1zqKDF6B/1D9+NVH0ygVvFfLZ041r2ZtIe/Z+vCdehQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhbzmednb51VVP/cfHYLn4WJNiCSU6wV9s+SXt926/GAIgEYCzXJSs0GjS5aLiEX+MZ5FdknmE0emvEkZXRfLOL6s="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"},"maintainers":[{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"}]},"0.1.1":{"name":"custom-error","version":"0.1.1","author":{"name":"Andre Z. Sanchez"},"description":"Create custom errors that inherit Error","main":"index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tape":"~2.13.3","tap-spec":"~0.2.0"},"scripts":{"test":"tape test/*.js | ./node_modules/.bin/tap-spec"},"keywords":["error","inherit","prototype"],"repository":{"type":"git","url":"git://github.com/AndreZSanchez/custom-error.git"},"testling":{"files":"test/*.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"homepage":"https://github.com/AndreZSanchez/custom-error","license":"MIT","bugs":{"url":"https://github.com/AndreZSanchez/custom-error/issues"},"_id":"custom-error@0.1.1","dist":{"shasum":"452fe108e164c7794eacbc3bd0a725f7a8d35ca2","tarball":"https://registry.npmjs.org/custom-error/-/custom-error-0.1.1.tgz","integrity":"sha512-5cHjcJ7om7cY3yFI2Lm+Rw0HEubZ5tjV6B9t/AgeFV8FYqK1o/FpwFssUyLV11qenH1gSbum70s+SaBYrC/1dg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUgDP8lyNWri9Zdpmm6seEEt0GRyi08broafy7cPe5YAIgfQ7dGoN363rN26bv4Tl3XBKzdqCYVJ9V+FNzjazi43s="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"},"maintainers":[{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"}]},"0.2.0":{"name":"custom-error","version":"0.2.0","author":{"name":"Andre Z. Sanchez"},"description":"Create custom errors that inherit Error","main":"index.js","dependencies":{},"devDependencies":{"tape":"~2.13.3","tap-spec":"~0.2.0"},"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js | tap-spec"},"keywords":["error","inherit","prototype"],"repository":{"type":"git","url":"git://github.com/andrezsanchez/custom-error.git"},"testling":{"files":"test/*.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"homepage":"https://github.com/andrezsanchez/custom-error","license":"MIT","gitHead":"ebc8c008f361964e0f30f6c2d069bf8a5b17e6f1","bugs":{"url":"https://github.com/andrezsanchez/custom-error/issues"},"_id":"custom-error@0.2.0","_shasum":"1fffdce1b3d0db6f8d4e26f5ffb338903cbf043b","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"},"maintainers":[{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"}],"dist":{"shasum":"1fffdce1b3d0db6f8d4e26f5ffb338903cbf043b","tarball":"https://registry.npmjs.org/custom-error/-/custom-error-0.2.0.tgz","integrity":"sha512-C/xEDhYNtC1yEqtgSUM93VU60BNVNlCOJpwWK3ThaR+WTjCj0VKwJWPvUiaKRLfSMfA27N5wFPW3NWHhwLt21A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGeGeXXx5tQZbliACnqqlBfas9REK4z8ajkZ5NHLw7bgAiAL5rWUO1g+gqtPGRoZJebs0tgwMIrnF9Ilnpe3I4MThg=="}]}},"0.2.1":{"name":"custom-error","version":"0.2.1","author":{"name":"Andre Z. Sanchez"},"description":"Create custom errors that inherit Error","main":"index.js","dependencies":{},"devDependencies":{"rewire":"^2.1.3","tap-spec":"~0.2.0","tape":"~2.13.3"},"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js | tap-spec"},"keywords":["error","inherit","prototype"],"repository":{"type":"git","url":"git://github.com/andrezsanchez/custom-error.git"},"homepage":"https://github.com/andrezsanchez/custom-error","license":"MIT","gitHead":"12f6a88ce38cd7cec67b4eb8dbaaaf3795e2e7cf","bugs":{"url":"https://github.com/andrezsanchez/custom-error/issues"},"_id":"custom-error@0.2.1","_shasum":"ddbf21cbba9f3beb5357335e0576b4c9534a08fe","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"},"maintainers":[{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"}],"dist":{"shasum":"ddbf21cbba9f3beb5357335e0576b4c9534a08fe","tarball":"https://registry.npmjs.org/custom-error/-/custom-error-0.2.1.tgz","integrity":"sha512-J+QO3e3Z0YpEaz04gNrPQMszcnkZeiS0l4Gj0OgBGzBVVOijE59rjiVFBpo/vSNM4/2TDCCZZ+WWlt1k8m33mQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEctQjIUT/m6svi+VI3/JWR4/4XeMC+x75tzt8hRv1nQIgEAmNY4aBKdxq4go1yRYW6Dn/ngGF16Ylhl1Yqwayzhc="}]}}},"readme":"# custom-error\n\nCreate custom errors that inherit Error.\n\n[![build status](https://secure.travis-ci.org/andrezsanchez/custom-error.png)](http://travis-ci.org/andrezsanchez/custom-error)\n\n# why\n\nExtending Error is a real [pain](http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript), so this library deals with the quirks, providing a clean API to extend Error that works across JS environments, including Node and browsers.\n\n# usage\n\nCalling `customError(errorTitle[, ParentError])` creates a new error class that can be called the\nsame way that `Error` is called. The new error constructor will inherit from `Error`, or from\n`ParentError` if you provide it.\n\n# examples\n\n``` js\nvar customError = require('custom-error');\n\nvar ApocalypseError = customError('ApocalypseError');\n\nApocalypseError() instanceof Error           // true\nApocalypseError() instanceof ApocalypseError // true\n\nvar UnixApocalypseError = customError('UnixApocalypseError', ApocalypseError)\n\nUnixApocalypseError() instanceof Error                 // true\nUnixApocalypseError() instanceof ApocalypseError       // true\nUnixApocalypseError() instanceof UnixApocalypseError   // true\n\nif (new Date().getFullYear() === 2038) {\n  throw UnixApocalypseError('OH NOES')\n}\n```\n\n## Using prototype\n\n``` js\nUnixApocalypseError.prototype.year = 2038\n\ntry {\n  throw UnixApocalypseError()\n}\ncatch (err) {\n  console.log(err.year) // 2038\n}\n```\n\n\n# installation\n\n``` bash\nnpm install custom-error\n```\n\n# license\n\nMIT\n","maintainers":[{"name":"andrezsanchez","email":"andrezacsanchez@gmail.com"}],"time":{"modified":"2022-06-14T06:12:15.805Z","created":"2014-06-14T02:18:06.574Z","0.0.0":"2014-06-14T02:18:06.574Z","0.1.0":"2014-06-14T02:52:54.723Z","0.1.1":"2014-06-14T18:05:43.035Z","0.2.0":"2014-11-18T02:41:22.644Z","0.2.1":"2014-12-29T14:45:41.333Z"},"homepage":"https://github.com/andrezsanchez/custom-error","keywords":["error","inherit","prototype"],"repository":{"type":"git","url":"git://github.com/andrezsanchez/custom-error.git"},"author":{"name":"Andre Z. Sanchez"},"bugs":{"url":"https://github.com/andrezsanchez/custom-error/issues"},"license":"MIT","readmeFilename":"README.md","users":{"aahz":true}}