stuff
This commit is contained in:
26
buildfiles/node_modules/es6-error/CHANGELOG.md
generated
vendored
Normal file
26
buildfiles/node_modules/es6-error/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# 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)
|
21
buildfiles/node_modules/es6-error/LICENSE.md
generated
vendored
Normal file
21
buildfiles/node_modules/es6-error/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
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.
|
59
buildfiles/node_modules/es6-error/README.md
generated
vendored
Normal file
59
buildfiles/node_modules/es6-error/README.md
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
# es6-error
|
||||
|
||||
[](https://www.npmjs.com/package/es6-error)
|
||||
[](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
|
72
buildfiles/node_modules/es6-error/es6/index.js
generated
vendored
Normal file
72
buildfiles/node_modules/es6-error/es6/index.js
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
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;
|
79
buildfiles/node_modules/es6-error/lib/index.js
generated
vendored
Normal file
79
buildfiles/node_modules/es6-error/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
'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'];
|
75
buildfiles/node_modules/es6-error/package.json
generated
vendored
Normal file
75
buildfiles/node_modules/es6-error/package.json
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"_from": "es6-error@^4.1.1",
|
||||
"_id": "es6-error@4.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
|
||||
"_location": "/es6-error",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "es6-error@^4.1.1",
|
||||
"name": "es6-error",
|
||||
"escapedName": "es6-error",
|
||||
"rawSpec": "^4.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/global-agent"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
|
||||
"_shasum": "9e3af407459deed47e9a91f9b885a84eb05c561d",
|
||||
"_spec": "es6-error@^4.1.1",
|
||||
"_where": "/home/shihaam/www/freezer.shihaam.me/node_modules/global-agent",
|
||||
"author": {
|
||||
"name": "Ben Youngblood"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/bjyoungblood/es6-error/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Easily-extendable error for use with ES6 classes",
|
||||
"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"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"es6",
|
||||
"typings"
|
||||
],
|
||||
"homepage": "https://github.com/bjyoungblood/es6-error",
|
||||
"keywords": [
|
||||
"es6",
|
||||
"error",
|
||||
"babel"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/index",
|
||||
"module": "./es6/index.js",
|
||||
"name": "es6-error",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/bjyoungblood/es6-error.git"
|
||||
},
|
||||
"scripts": {
|
||||
"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",
|
||||
"clean": "rimraf lib es6",
|
||||
"prepublishOnly": "npm run build && npm run test",
|
||||
"test": "cross-env BABEL_ENV=test mocha --require babel-core/register --recursive"
|
||||
},
|
||||
"typings": "./typings/index.d.ts",
|
||||
"version": "4.1.1"
|
||||
}
|
1
buildfiles/node_modules/es6-error/typings/index.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/es6-error/typings/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export default class ExtendableError extends Error { }
|
Reference in New Issue
Block a user