{"name":"es6-error","version":"2.1.0","description":"Easily-extendable error for use with ES6 classes","main":"dist/index.js","scripts":{"test":"mocha --compilers js:babel/register","prepublish":"npm test && make dist"},"repository":{"type":"git","url":"git+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":"^5.1.11","chai":"^3.2.0","mocha":"^2.3.2"},"dependencies":{},"gitHead":"551b3b9f02b03b034c9d53b130a41d9d44951bea","_id":"es6-error@2.1.0","_shasum":"28bf8707c57b7a0cf33b44a9fab9d45cad35b21e","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"bjy","email":"bx.youngblood@gmail.com"},"maintainers":[{"name":"bjy","email":"bx.youngblood@gmail.com"}],"dist":{"shasum":"28bf8707c57b7a0cf33b44a9fab9d45cad35b21e","tarball":"http://registry-npm.ywwl.com/es6-error/download/es6-error-2.1.0.tgz","integrity":"sha512-ojlk4xiRGyMend75j5UJytRA2z0BuJ+2DWO8yZSN3K0Q02h/NgBpFPLulKN+pV1/MO+u/2qR37H1SnDhbUBh4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICl0LnRrewaoyqSApq3e91Yg+etIXZXanJNypbyx/+8NAiEAnAIJhXpcPouJDMRLLOPHemJECtMT6gzl03eZbRb6TXY="}],"size":3286,"noattachment":false,"key":"/es6-error/-/es6-error-2.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/es6-error-2.1.0.tgz_1457456548433_0.8433945386204869"},"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":1457456552874,"_cnpm_publish_time":1457456552874,"dist-tags":{"latest":"4.1.1"}}