{"_id":"create-error-class","_rev":"39382","name":"create-error-class","description":"Create Error classes","dist-tags":{"latest":"3.0.2"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"time":{"modified":"2021-06-03T10:11:29.000Z","created":"2015-07-19T15:37:16.978Z","3.0.2":"2016-04-05T07:14:51.418Z","3.0.1":"2016-02-25T09:01:15.392Z","3.0.0":"2015-12-06T08:08:04.609Z","2.0.1":"2015-07-27T08:19:21.871Z","2.0.0":"2015-07-24T09:20:04.481Z","1.0.0":"2015-07-19T15:37:16.978Z"},"users":{"knksmith57":true,"alextes":true,"soldair":true},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"versions":{"3.0.2":{"name":"create-error-class","version":"3.0.2","description":"Create Error classes","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":[],"dependencies":{"capture-stack-trace":"^1.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"af3f3979494c4eca0b0259d12035e7fb84fa302f","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"homepage":"https://github.com/floatdrop/create-error-class","_id":"create-error-class@3.0.2","_shasum":"06be7abef947a3f14a30fd610671d401bca8b7b6","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.1","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"06be7abef947a3f14a30fd610671d401bca8b7b6","size":2000,"noattachment":false,"key":"/create-error-class/-/create-error-class-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-error-class/download/create-error-class-3.0.2.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/create-error-class-3.0.2.tgz_1459840488945_0.7410781022626907"},"directories":{},"publish_time":1459840491418,"_cnpm_publish_time":1459840491418,"_hasShrinkwrap":false},"3.0.1":{"name":"create-error-class","version":"3.0.1","description":"Create Error classes","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":[],"dependencies":{"capture-stack-trace":"^1.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"ada0da60245d8208b8070771f61632318b826880","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"homepage":"https://github.com/floatdrop/create-error-class","_id":"create-error-class@3.0.1","_shasum":"052c6dc235679232e0767063fb9b24d9f018e2ed","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"052c6dc235679232e0767063fb9b24d9f018e2ed","size":2010,"noattachment":false,"key":"/create-error-class/-/create-error-class-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-error-class/download/create-error-class-3.0.1.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/create-error-class-3.0.1.tgz_1456390872500_0.054214196279644966"},"directories":{},"publish_time":1456390875392,"_cnpm_publish_time":1456390875392,"_hasShrinkwrap":false},"3.0.0":{"name":"create-error-class","version":"3.0.0","description":"Create Error classes","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":[],"dependencies":{"capture-stack-trace":"^1.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"be768a927db4955dccb841e6ce1fd4abdb8ba7e0","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"homepage":"https://github.com/floatdrop/create-error-class","_id":"create-error-class@3.0.0","_shasum":"5f38cf460e836298f38841f28d6415d68b1ebeb3","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"5f38cf460e836298f38841f28d6415d68b1ebeb3","size":2021,"noattachment":false,"key":"/create-error-class/-/create-error-class-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-error-class/download/create-error-class-3.0.0.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"directories":{},"publish_time":1449389284609,"_cnpm_publish_time":1449389284609,"_hasShrinkwrap":false},"2.0.1":{"name":"create-error-class","version":"2.0.1","description":"Create Error classes","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":[],"dependencies":{"capture-stack-trace":"^1.0.0","inherits":"^2.0.1"},"devDependencies":{"mocha":"*"},"gitHead":"bec0186ac350c5b89b1707d395c23a5a080b4f45","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"homepage":"https://github.com/floatdrop/create-error-class","_id":"create-error-class@2.0.1","_shasum":"a8759ed5c8d214a461e81d18e70aacb33dd63c9c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"dist":{"shasum":"a8759ed5c8d214a461e81d18e70aacb33dd63c9c","size":1184,"noattachment":false,"key":"/create-error-class/-/create-error-class-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-error-class/download/create-error-class-2.0.1.tgz"},"directories":{},"publish_time":1437985161871,"_cnpm_publish_time":1437985161871,"_hasShrinkwrap":false},"2.0.0":{"name":"create-error-class","version":"2.0.0","description":"Create Error classes","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":[],"dependencies":{"capture-stack-trace":"^1.0.0","inherits":"^2.0.1"},"devDependencies":{"mocha":"*"},"gitHead":"3766994bd273fb404a4ec1c4e728a2faf607cc25","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"homepage":"https://github.com/floatdrop/create-error-class","_id":"create-error-class@2.0.0","_shasum":"3bdf7477c2fce61aaee3500d2faebf45c95370a6","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"dist":{"shasum":"3bdf7477c2fce61aaee3500d2faebf45c95370a6","size":1101,"noattachment":false,"key":"/create-error-class/-/create-error-class-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-error-class/download/create-error-class-2.0.0.tgz"},"directories":{},"publish_time":1437729604481,"_cnpm_publish_time":1437729604481,"_hasShrinkwrap":false},"1.0.0":{"name":"create-error-class","version":"1.0.0","description":"Create Error classes","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/create-error-class"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":[],"dependencies":{"object-assign":"^3.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"07c3b108d16dd8cbd535dafac9549e9bb023e7d5","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"homepage":"https://github.com/floatdrop/create-error-class","_id":"create-error-class@1.0.0","_shasum":"339a476daaa7c0aaf1630af793e55384126c6552","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"339a476daaa7c0aaf1630af793e55384126c6552","size":1801,"noattachment":false,"key":"/create-error-class/-/create-error-class-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-error-class/download/create-error-class-1.0.0.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"directories":{},"publish_time":1437320236978,"_cnpm_publish_time":1437320236978,"_hasShrinkwrap":false}},"readme":"# create-error-class [![Build Status](https://travis-ci.org/floatdrop/create-error-class.svg?branch=master)](https://travis-ci.org/floatdrop/create-error-class)\n\n> Create error class\n\n\n## Install\n\n```\n$ npm install --save create-error-class\n```\n\n\n## Usage\n\n```js\nvar createErrorClass = require('create-error-class');\n\nvar HTTPError = createErrorClass('HTTPError', function (props) {\n\tthis.message = 'Status code is ' + props.statusCode;\n});\n\nthrow new HTTPError({statusCode: 404});\n```\n\n\n## API\n\n### createErrorClass(className, [setup])\n\nReturn constructor of Errors with `className`.\n\n#### className\n\n*Required*  \nType: `string`\n\nClass name of Error Object. Should contain characters from `[0-9a-zA-Z_$]` range.\n\n#### setup\nType: `function`\n\nSetup function, that will be called after each Error object is created from constructor with context of Error object.\n\nBy default `setup` function sets `this.message` as first argument:\n\n```js\nvar MyError = createErrorClass('MyError');\n\nnew MyError('Something gone wrong!').message; // => 'Something gone wrong!'\n```\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n","_attachments":{},"homepage":"https://github.com/floatdrop/create-error-class","bugs":{"url":"https://github.com/floatdrop/create-error-class/issues"},"license":"MIT"}