{"name":"es6-error","version":"3.0.1","description":"Easily-extendable error for use with ES6 classes","main":"./lib/index","jsnext:main":"./src/index","scripts":{"test":"mocha --compilers js:babel-core/register --recursive","build":"babel ./src --out-dir ./lib","prepublish":"npm run build && npm run test"},"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-cli":"^6.8.0","babel-core":"^6.8.0","babel-plugin-add-module-exports":"^0.1.4","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015":"^6.6.0","chai":"^3.2.0","mocha":"^2.4.5"},"dependencies":{},"gitHead":"a5972952d62b73062f97dc459efaecbcf92b7551","_id":"es6-error@3.0.1","_shasum":"c9e937f0df9e1cd0a214b8547552a7a96f00baea","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.2.2","_npmUser":{"name":"bjy","email":"bx.youngblood@gmail.com"},"maintainers":[{"name":"bjy","email":"bx.youngblood@gmail.com"}],"dist":{"shasum":"c9e937f0df9e1cd0a214b8547552a7a96f00baea","tarball":"http://registry-npm.ywwl.com/es6-error/download/es6-error-3.0.1.tgz","integrity":"sha512-sg+3UsiFbMS4hRwqKLUP6ga7u48jnJoT7jpO2XyqJMhF3ho+pNh2zWNIomRXfAUwClTVZ2p4qGWuYBTdWwjL1A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6W1NGyLhmS8eBiNHVaNmX3szFqgs8f219VOvveEGEcAiBDvKmTK8n8WRhgApsaDfGR6f5CtuSxurlSqRWjV0T2Iw=="}],"size":3530,"noattachment":false,"key":"/es6-error/-/es6-error-3.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/es6-error-3.0.1.tgz_1468531638516_0.5317225717008114"},"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":1468531641072,"_cnpm_publish_time":1468531641072,"dist-tags":{"latest":"4.1.1"}}