{"name":"es6-error","version":"1.0.0","description":"Easily-extendable error for use with ES6 classes","main":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/bjyoungblood/es6-error.git"},"keywords":["es6","error","babel"],"author":{"name":"Ben Youngblood"},"license":"MIT","bugs":{"url":"https://github.com/bjyoungblood/es6-error/issues"},"homepage":"https://github.com/bjyoungblood/es6-error","devDependencies":{"babel":"^4.7.16"},"gitHead":"184e2363183b467cf3fd764e958fd34b89c4ea52","_id":"es6-error@1.0.0","_shasum":"7ee0a88cb12f3cbeee4b5d2e834da4ab5b0fd396","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.10.36","_npmUser":{"name":"bjy","email":"bx.youngblood@gmail.com"},"maintainers":[{"name":"bjy","email":"bx.youngblood@gmail.com"}],"dist":{"shasum":"7ee0a88cb12f3cbeee4b5d2e834da4ab5b0fd396","tarball":"http://registry-npm.ywwl.com/es6-error/download/es6-error-1.0.0.tgz","integrity":"sha512-btHTpQ7RinLP1/FLtC9h92mBgIazgkeq5nfxMK3AH2kilEKBjuCw1vNrDfviv0zWJd6nJHrMI0jgWageEBaxcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERFgtfarx6UoEgAwzoVEp3xBS3xZ9rW6pr79Qc67Z6dAiEAubVFlfIUu8rWTmAayU0kws2V2qWIKqoUpoURriXnGsc="}],"size":2420,"noattachment":false,"key":"/es6-error/-/es6-error-1.0.0.tgz"},"directories":{},"readme":"# es6-error\n\n[![npm version](https://badge.fury.io/js/es6-error.svg)](https://www.npmjs.com/package/es6-error)\n[![Build Status](https://travis-ci.org/bjyoungblood/es6-error.svg?branch=master)](https://travis-ci.org/bjyoungblood/es6-error)\n\nAn easily-extendable error class for use with ES6 classes (or ES5, if you so\nchoose).\n\nTested in Node 4.0, Chrome, and Firefox.\n\n## Why?\n\nI made this because I wanted to be able to extend Error for inheritance and type\nchecking, but can never remember to add\n`Error.captureStackTrace(this, this.constructor.name)` to the constructor or how\nto get the proper name to print from `console.log`.\n\n## ES6 Usage\n\n```javascript\n\nimport ExtendableError from 'es6-error';\n\nclass MyError extends ExtendableError {\n  // constructor is optional; you should omit it if you just want a custom error\n  // type for inheritance and type checking\n  constructor(message = 'Default message') {\n    super(message);\n  }\n}\n\nexport default MyError;\n```\n\n## ES5 Usage\n\n```javascript\n\nvar util = require('util');\nvar ExtendableError = require('es6-error');\n\nfunction MyError(message) {\n  message = message || 'Default message';\n  ExtendableError.call(this, message);\n}\n\nutil.inherits(MyError, ExtendableError);\n\nmodule.exports = MyError;\n```\n\n### Known Issues\n\n- Uglification can obscure error class names ([#31](https://github.com/bjyoungblood/es6-error/issues/31#issuecomment-301128220))\n\n#### Todo\n\n- Better browser compatibility\n- Browser tests\n","publish_time":1427576405005,"_cnpm_publish_time":1427576405005,"dist-tags":{"latest":"4.1.1"}}