summaryrefslogtreecommitdiffstats
path: root/node_modules/create-error-class
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/create-error-class')
-rw-r--r--node_modules/create-error-class/index.js44
-rw-r--r--node_modules/create-error-class/license21
-rw-r--r--node_modules/create-error-class/package.json60
-rw-r--r--node_modules/create-error-class/readme.md54
4 files changed, 0 insertions, 179 deletions
diff --git a/node_modules/create-error-class/index.js b/node_modules/create-error-class/index.js
deleted file mode 100644
index e415aa7..0000000
--- a/node_modules/create-error-class/index.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-var captureStackTrace = require('capture-stack-trace');
-
-function inherits(ctor, superCtor) {
- ctor.super_ = superCtor;
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
-}
-
-module.exports = function createErrorClass(className, setup) {
- if (typeof className !== 'string') {
- throw new TypeError('Expected className to be a string');
- }
-
- if (/[^0-9a-zA-Z_$]/.test(className)) {
- throw new Error('className contains invalid characters');
- }
-
- setup = setup || function (message) {
- this.message = message;
- };
-
- var ErrorClass = function () {
- Object.defineProperty(this, 'name', {
- configurable: true,
- value: className,
- writable: true
- });
-
- captureStackTrace(this, this.constructor);
-
- setup.apply(this, arguments);
- };
-
- inherits(ErrorClass, Error);
-
- return ErrorClass;
-};
diff --git a/node_modules/create-error-class/license b/node_modules/create-error-class/license
deleted file mode 100644
index 1aeb74f..0000000
--- a/node_modules/create-error-class/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/create-error-class/package.json b/node_modules/create-error-class/package.json
deleted file mode 100644
index f395a12..0000000
--- a/node_modules/create-error-class/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "_from": "create-error-class@^3.0.0",
- "_id": "create-error-class@3.0.2",
- "_inBundle": false,
- "_integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
- "_location": "/create-error-class",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "create-error-class@^3.0.0",
- "name": "create-error-class",
- "escapedName": "create-error-class",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/got"
- ],
- "_resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
- "_shasum": "06be7abef947a3f14a30fd610671d401bca8b7b6",
- "_spec": "create-error-class@^3.0.0",
- "_where": "/home/pruss/Dev/3-minute-website/node_modules/got",
- "author": {
- "name": "Vsevolod Strukchinsky",
- "email": "floatdrop@gmail.com",
- "url": "github.com/floatdrop"
- },
- "bugs": {
- "url": "https://github.com/floatdrop/create-error-class/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "capture-stack-trace": "^1.0.0"
- },
- "deprecated": false,
- "description": "Create Error classes",
- "devDependencies": {
- "mocha": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/floatdrop/create-error-class#readme",
- "keywords": [],
- "license": "MIT",
- "name": "create-error-class",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/floatdrop/create-error-class.git"
- },
- "scripts": {
- "test": "mocha"
- },
- "version": "3.0.2"
-}
diff --git a/node_modules/create-error-class/readme.md b/node_modules/create-error-class/readme.md
deleted file mode 100644
index d993cea..0000000
--- a/node_modules/create-error-class/readme.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# create-error-class [![Build Status](https://travis-ci.org/floatdrop/create-error-class.svg?branch=master)](https://travis-ci.org/floatdrop/create-error-class)
-
-> Create error class
-
-
-## Install
-
-```
-$ npm install --save create-error-class
-```
-
-
-## Usage
-
-```js
-var createErrorClass = require('create-error-class');
-
-var HTTPError = createErrorClass('HTTPError', function (props) {
- this.message = 'Status code is ' + props.statusCode;
-});
-
-throw new HTTPError({statusCode: 404});
-```
-
-
-## API
-
-### createErrorClass(className, [setup])
-
-Return constructor of Errors with `className`.
-
-#### className
-
-*Required*
-Type: `string`
-
-Class name of Error Object. Should contain characters from `[0-9a-zA-Z_$]` range.
-
-#### setup
-Type: `function`
-
-Setup function, that will be called after each Error object is created from constructor with context of Error object.
-
-By default `setup` function sets `this.message` as first argument:
-
-```js
-var MyError = createErrorClass('MyError');
-
-new MyError('Something gone wrong!').message; // => 'Something gone wrong!'
-```
-
-## License
-
-MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)