{"_id":"custom-error-class","_rev":"1-852bfa96ae063e4a3443a40e611a6d43","name":"custom-error-class","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"custom-error-class","version":"1.0.0","description":"Straightforward ES6 class you can extend to make proper custom errors","main":"index.js","dependencies":{},"devDependencies":{"standard":"^12.0.1","tape":"^4.9.2"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/custom-error-class.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/custom-error-class/issues"},"homepage":"https://github.com/mafintosh/custom-error-class","gitHead":"b5e7badab10474a95d0ce35592b057dd926f171a","_id":"custom-error-class@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-bHT5BAycUbsHYexiPuoIEM/o770u48yWBrZHw/f+BRVkERn19xTgNwcHt79A/AYMxUcOfPjb9OrKoj6rVvPJuA==","shasum":"2cab70fbee030996c79a7b166250d8c8150051ae","tarball":"https://registry.npmjs.org/custom-error-class/-/custom-error-class-1.0.0.tgz","fileCount":5,"unpackedSize":3257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSiDyCRA9TVsSAnZWagAAOsYP/1VcEUrl+9QCmDcwmhV7\nPAET8iamElaOKmMjIaFNO9Ij89wCbcqJ1wUhk0/q4xorLbAZjniXkMuF6Hsx\nI2c0W69+kdZJrkCeoPVROc9k6Nhbbi/WALBGEH1JB06HZJbTAb44bzS/pm/D\nVpy3q23oeItqU24mHNL1JZMsm0ljJo1PcfPw+4GDnZO2gzbqInL8fY+pelNV\nz7qr6nCK4/y1fIEewW3JiTAzfRHXwQL9/TP3ybmqjshl+SrtQ5Fw1a9D5fkS\nVuoNc+8ob5Y33Fm14XH6XqlbOoJbrXgbwmyz9us7Re9AAyxhvrCI3oIriVMk\nRBpaNGgT5Wxje8Xt3eXBWYeoIYkOEIYm8Lz8mg9afO+Hf0yRsztCpKQV40kD\nOHxuLBpqCLjX9AvfWWh6nxHDPUxBYoF0jfSBWB+h8E8vhX5DHbcLh8AOtZqp\nAilAYobeH0duPDzdSsczn88FDu2G/OJxz/kjB9ClbRIYH3RawTHRFqISkM19\nbyb04ube0mV8dA/wJu7iD2Zt8lEKRYQaTYcpxVj73CM8eeccRiUE+C7Vcq2d\nsLXQxt4X/2XbRIyNm6HUptDGJgeDK34sfeKGU4aBo2r9ZogC4AKm8fzwiXbl\nAx66wGqjQuQ6Aw/pCX8uVEupkf4K9E1kVrZZkfCxrxPK82N//IlCjhijhTVG\nNZta\r\n=CrgB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFMezHgmL5rnucRI1Y+Bljs2Jv9fCehfVQluE7iuyrFAIhAIEMighyK2r0Vy8KVRScaE5FFZV/CUcAjK+2SSwHRtYs"}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/custom-error-class_1.0.0_1548361969728_0.07076605339833408"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-24T20:32:49.728Z","1.0.0":"2019-01-24T20:32:49.920Z","modified":"2022-04-28T01:18:26.127Z"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"description":"Straightforward ES6 class you can extend to make proper custom errors","homepage":"https://github.com/mafintosh/custom-error-class","repository":{"type":"git","url":"git+https://github.com/mafintosh/custom-error-class.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/custom-error-class/issues"},"license":"MIT","readme":"# custom-error-class\n\nStraightforward ES6 class you can extend to make custom errors that are all `instanceof` Error with proper stacks.\n\n```\nnpm install custom-error-class\n```\n\n## Usage\n\n``` js\nconst CustomError = require('custom-error-class')\n\nclass MyError extends CustomError {\n  constructor () {\n    super('an error happened')\n    this.code = 'SOME_CODE'\n  }\n}\n\n// Use this error as you normally would.\nthrow new MyError()\n```\n\nCredits to [@pfrazee](https://github.com/pfrazee) who wrote most of it.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}