Comparing version 4.1.0 to 4.1.1
@@ -7,5 +7,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var ExtendableError = function (_Error) { | ||
_inherits(ExtendableError, _Error); | ||
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() { | ||
@@ -48,4 +71,4 @@ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
return ExtendableError; | ||
}(Error); | ||
}(_extendableBuiltin(Error)); | ||
export default ExtendableError; |
@@ -13,5 +13,28 @@ 'use strict'; | ||
var ExtendableError = function (_Error) { | ||
_inherits(ExtendableError, _Error); | ||
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() { | ||
@@ -54,5 +77,5 @@ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
return ExtendableError; | ||
}(Error); | ||
}(_extendableBuiltin(Error)); | ||
exports.default = ExtendableError; | ||
module.exports = exports['default']; |
{ | ||
"name": "es6-error", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Easily-extendable error for use with ES6 classes", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
@@ -52,2 +52,6 @@ # es6-error | ||
### Known Issues | ||
- Uglification can obscure error class names ([#31](https://github.com/bjyoungblood/es6-error/issues/31#issuecomment-301128220)) | ||
#### Todo | ||
@@ -54,0 +58,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9858
120
60
0