{"name":"es6-error","version":"4.1.0","description":"Easily-extendable error for use with ES6 classes","main":"./lib/index","module":"./es6/index.js","typings":"./typings/index.d.ts","files":["lib","es6","typings"],"scripts":{"test":"cross-env BABEL_ENV=test mocha --require babel-core/register --recursive","clean":"rimraf lib es6","build":"npm run clean && npm run build:cjs && npm run build:es6","build:cjs":"mkdir -p lib && cross-env BABEL_ENV=cjs babel src/index.js -o lib/index.js","build:es6":"mkdir -p es6 && cross-env BABEL_ENV=es6 babel src/index.js -o es6/index.js","prepublishOnly":"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.26.0","babel-core":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-builtin-extend":"^1.1.2","babel-preset-env":"^1.6.1","chai":"^4.1.2","cross-env":"^5.1.1","mocha":"^4.0.1","rimraf":"^2.6.2"},"dependencies":{},"gitHead":"531da4bc15ad078173e1632011c76361dae36c7e","_id":"es6-error@4.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.2.1","_npmUser":{"name":"bjy","email":"bx.youngblood@gmail.com"},"dist":{"integrity":"sha512-llYs3hljgsJvWfHxAfkdygcZckdRkzt7J9lwX5WOKY9uekyw8aHIG/VZzSZjyD8Uy7ezS3feanhHOLZ9SsPVBQ==","shasum":"728deea5160f5e209b73fe4d51a0653afa0aa17d","tarball":"http://registry-npm.ywwl.com/es6-error/download/es6-error-4.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8I6GyXxqzl7zjwXq50ZnMXbox3gYXF1B6lhFm8fpCrAiAaFTsxGde+OP7B9Zp21yAwkBybRdZtdl6l9gLeZCn8Pg=="}],"size":3123,"noattachment":false,"key":"/es6-error/-/es6-error-4.1.0.tgz"},"maintainers":[{"name":"bjy","email":"bx.youngblood@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es6-error-4.1.0.tgz_1514924449340_0.8196441826876253"},"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":1514924450234,"_cnpm_publish_time":1514924450234,"dist-tags":{"latest":"4.1.1"}}