summaryrefslogtreecommitdiff
path: root/node_modules/es6-error
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es6-error')
-rw-r--r--node_modules/es6-error/CHANGELOG.md26
-rw-r--r--node_modules/es6-error/LICENSE.md21
-rw-r--r--node_modules/es6-error/README.md59
-rw-r--r--node_modules/es6-error/es6/index.js72
-rw-r--r--node_modules/es6-error/lib/index.js79
-rw-r--r--node_modules/es6-error/package.json48
-rw-r--r--node_modules/es6-error/typings/index.d.ts1
7 files changed, 0 insertions, 306 deletions
diff --git a/node_modules/es6-error/CHANGELOG.md b/node_modules/es6-error/CHANGELOG.md
deleted file mode 100644
index 9e82c81..0000000
--- a/node_modules/es6-error/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Change Log
-
-## [v4.0.1] - 2017-01-04
-### Fixed
- - jsnext build uses `babel-plugin-transform-builtin-extend` (#27)
-
-## [v4.0.0] - 2016-10-03
-### Added
- - jsnext build (#26)
-
-## [v3.2.0] - 2016-09-29
-### Added
- - TypeScript definitions (#24)
-
-## [v3.1.0] - 2016-09-08
-### Changed
- - Point jsnext build to transpiled code (#23)
-
-## [v3.0.1] - 2016-07-14
-### Changed
- - Move Babel config to `.babelrc` (#20)
-
-## [v3.0.0] - 2016-05-18
-### Changed
- - Upgrade to Babel 6 (#16)
- - Make `message`, `name`, and `stack` properties configurable (to match built-in `Error`) (#17)
diff --git a/node_modules/es6-error/LICENSE.md b/node_modules/es6-error/LICENSE.md
deleted file mode 100644
index 4737fd1..0000000
--- a/node_modules/es6-error/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Ben Youngblood
-
-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/es6-error/README.md b/node_modules/es6-error/README.md
deleted file mode 100644
index 8a8f130..0000000
--- a/node_modules/es6-error/README.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# es6-error
-
-[![npm version](https://badge.fury.io/js/es6-error.svg)](https://www.npmjs.com/package/es6-error)
-[![Build Status](https://travis-ci.org/bjyoungblood/es6-error.svg?branch=master)](https://travis-ci.org/bjyoungblood/es6-error)
-
-An easily-extendable error class for use with ES6 classes (or ES5, if you so
-choose).
-
-Tested in Node 4.0, Chrome, and Firefox.
-
-## Why?
-
-I made this because I wanted to be able to extend Error for inheritance and type
-checking, but can never remember to add
-`Error.captureStackTrace(this, this.constructor.name)` to the constructor or how
-to get the proper name to print from `console.log`.
-
-## ES6 Usage
-
-```javascript
-
-import ExtendableError from 'es6-error';
-
-class MyError extends ExtendableError {
- // constructor is optional; you should omit it if you just want a custom error
- // type for inheritance and type checking
- constructor(message = 'Default message') {
- super(message);
- }
-}
-
-export default MyError;
-```
-
-## ES5 Usage
-
-```javascript
-
-var util = require('util');
-var ExtendableError = require('es6-error');
-
-function MyError(message) {
- message = message || 'Default message';
- ExtendableError.call(this, message);
-}
-
-util.inherits(MyError, ExtendableError);
-
-module.exports = MyError;
-```
-
-### Known Issues
-
-- Uglification can obscure error class names ([#31](https://github.com/bjyoungblood/es6-error/issues/31#issuecomment-301128220))
-
-#### Todo
-
-- Better browser compatibility
-- Browser tests
diff --git a/node_modules/es6-error/es6/index.js b/node_modules/es6-error/es6/index.js
deleted file mode 100644
index 70fbfbc..0000000
--- a/node_modules/es6-error/es6/index.js
+++ /dev/null
@@ -1,72 +0,0 @@
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-function _extendableBuiltin(cls) {
- function ExtendableBuiltin() {
- cls.apply(this, arguments);
- }
-
- ExtendableBuiltin.prototype = Object.create(cls.prototype, {
- constructor: {
- value: cls,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
-
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(ExtendableBuiltin, cls);
- } else {
- ExtendableBuiltin.__proto__ = cls;
- }
-
- return ExtendableBuiltin;
-}
-
-var ExtendableError = function (_extendableBuiltin2) {
- _inherits(ExtendableError, _extendableBuiltin2);
-
- function ExtendableError() {
- var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
-
- _classCallCheck(this, ExtendableError);
-
- // extending Error is weird and does not propagate `message`
- var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
-
- Object.defineProperty(_this, 'message', {
- configurable: true,
- enumerable: false,
- value: message,
- writable: true
- });
-
- Object.defineProperty(_this, 'name', {
- configurable: true,
- enumerable: false,
- value: _this.constructor.name,
- writable: true
- });
-
- if (Error.hasOwnProperty('captureStackTrace')) {
- Error.captureStackTrace(_this, _this.constructor);
- return _possibleConstructorReturn(_this);
- }
-
- Object.defineProperty(_this, 'stack', {
- configurable: true,
- enumerable: false,
- value: new Error(message).stack,
- writable: true
- });
- return _this;
- }
-
- return ExtendableError;
-}(_extendableBuiltin(Error));
-
-export default ExtendableError;
diff --git a/node_modules/es6-error/lib/index.js b/node_modules/es6-error/lib/index.js
deleted file mode 100644
index 617bef7..0000000
--- a/node_modules/es6-error/lib/index.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-function _extendableBuiltin(cls) {
- function ExtendableBuiltin() {
- cls.apply(this, arguments);
- }
-
- ExtendableBuiltin.prototype = Object.create(cls.prototype, {
- constructor: {
- value: cls,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
-
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(ExtendableBuiltin, cls);
- } else {
- ExtendableBuiltin.__proto__ = cls;
- }
-
- return ExtendableBuiltin;
-}
-
-var ExtendableError = function (_extendableBuiltin2) {
- _inherits(ExtendableError, _extendableBuiltin2);
-
- function ExtendableError() {
- var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
-
- _classCallCheck(this, ExtendableError);
-
- // extending Error is weird and does not propagate `message`
- var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
-
- Object.defineProperty(_this, 'message', {
- configurable: true,
- enumerable: false,
- value: message,
- writable: true
- });
-
- Object.defineProperty(_this, 'name', {
- configurable: true,
- enumerable: false,
- value: _this.constructor.name,
- writable: true
- });
-
- if (Error.hasOwnProperty('captureStackTrace')) {
- Error.captureStackTrace(_this, _this.constructor);
- return _possibleConstructorReturn(_this);
- }
-
- Object.defineProperty(_this, 'stack', {
- configurable: true,
- enumerable: false,
- value: new Error(message).stack,
- writable: true
- });
- return _this;
- }
-
- return ExtendableError;
-}(_extendableBuiltin(Error));
-
-exports.default = ExtendableError;
-module.exports = exports['default'];
diff --git a/node_modules/es6-error/package.json b/node_modules/es6-error/package.json
deleted file mode 100644
index c5782a5..0000000
--- a/node_modules/es6-error/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "es6-error",
- "version": "4.1.1",
- "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": "https://github.com/bjyoungblood/es6-error.git"
- },
- "keywords": [
- "es6",
- "error",
- "babel"
- ],
- "author": "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": {}
-}
diff --git a/node_modules/es6-error/typings/index.d.ts b/node_modules/es6-error/typings/index.d.ts
deleted file mode 100644
index c1b1f12..0000000
--- a/node_modules/es6-error/typings/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export default class ExtendableError extends Error { }