🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ts-custom-error

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-custom-error - npm Package Compare versions

Comparing version

to
3.1.0

LICENSE

@@ -0,1 +1,8 @@

# [3.1.0](https://github.com/adriengibrat/ts-custom-error/compare/v3.0.0...v3.1.0) (2019-05-17)
### Features
* **log:** Behave like native Error when using console.log ([f884c51](https://github.com/adriengibrat/ts-custom-error/commit/f884c51)), closes [#30](https://github.com/adriengibrat/ts-custom-error/issues/30)
# [3.0.0](https://github.com/adriengibrat/ts-custom-error/compare/v2.2.2...v3.0.0) (2019-03-15)

@@ -2,0 +9,0 @@

5

dist/custom-error.js

@@ -45,3 +45,6 @@ /*! *****************************************************************************

var _this = _super.call(this, message) || this;
_this.name = _newTarget.name;
Object.defineProperty(_this, 'name', {
value: _newTarget.name,
enumerable: false
});
fixProto(_this, _newTarget.prototype);

@@ -48,0 +51,0 @@ fixStack(_this);

7

dist/custom-error.umd.js

@@ -54,3 +54,6 @@ (function (global, factory) {

var _this = _super.call(this, message) || this;
_this.name = _newTarget.name;
Object.defineProperty(_this, 'name', {
value: _newTarget.name,
enumerable: false
});
fixProto(_this, _newTarget.prototype);

@@ -65,3 +68,3 @@ fixStack(_this);

//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1lcnJvci50cyhvcmlnaW5hbCkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsWUFBWSxhQUFhO0FBQ3pCLFFBQVMsVUFBVSxlQUFnQjtBQUNuQyxHQUFBLENBQUksZUFBZSxVQUFVLFFBQVE7SUFDakMsT0FBQSxDQUFRLFNBQVIsQ0FBa0IsYUFBYTtJQUMvQixTQUFTLFlBQVksU0FBUztRQUMxQixHQUFB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ICAgZnVuY3Rpb24gQ3VzdG9tRXJyb3IobWVzc2FnZSkge1xyXG4gICAgICAgIHZhciBfbmV3VGFyZ2V0ID0gdGhpcy5jb25zdHJ1Y3RvcjtcclxuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBtZXNzYWdlKSB8fCB0aGlzO1xyXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShfdGhpcywgJ25hbWUnLCB7XHJcbiAgICAgICAgICAgIHZhbHVlOiBfbmV3VGFyZ2V0Lm5hbWUsXHJcbiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIGZpeFByb3RvKF90aGlzLCBfbmV3VGFyZ2V0LnByb3RvdHlwZSk7XHJcbiAgICAgICAgZml4U3RhY2soX3RoaXMpO1xyXG4gICAgICAgIHJldHVybiBfdGhpcztcclxuICAgIH1cclxuICAgIHJldHVybiBDdXN0b21FcnJvcjtcclxufShFcnJvcikpO1xyXG5leHBvcnQgeyBDdXN0b21FcnJvciB9O1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1jdXN0b20tZXJyb3IuanMubWFwIl19

@@ -68,0 +71,0 @@ function customErrorFactory(fn, parent) {

@@ -1,1 +0,1 @@

!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory(global.tsCustomError={})}(this,function(exports){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};function fixStack(target,fn){void 0===fn&&(fn=target.constructor);var captureStackTrace=Error.captureStackTrace;captureStackTrace&&captureStackTrace(target,fn)}var CustomError=function(_super){function CustomError(message){var target,prototype,setPrototypeOf,_newTarget=this.constructor,_this=_super.call(this,message)||this;return _this.name=_newTarget.name,target=_this,prototype=_newTarget.prototype,(setPrototypeOf=Object.setPrototypeOf)?setPrototypeOf(target,prototype):target.__proto__=prototype,fixStack(_this),_this}return function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}(CustomError,_super),CustomError}(Error);exports.CustomError=CustomError,exports.customErrorFactory=function(fn,parent){function CustomError(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(!(this instanceof CustomError))return new(CustomError.bind.apply(CustomError,[void 0].concat(args)));parent.apply(this,args),fn.apply(this,args),this.name=fn.name||parent.name,fixStack(this,CustomError)}return void 0===parent&&(parent=Error),Object.defineProperties(CustomError,{prototype:{value:Object.create(parent.prototype,{constructor:{value:CustomError,writable:!0,configurable:!0}})}})}});
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory(global.tsCustomError={})}(this,function(exports){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};function fixStack(target,fn){void 0===fn&&(fn=target.constructor);var captureStackTrace=Error.captureStackTrace;captureStackTrace&&captureStackTrace(target,fn)}var CustomError=function(_super){function CustomError(message){var target,prototype,setPrototypeOf,_newTarget=this.constructor,_this=_super.call(this,message)||this;return Object.defineProperty(_this,"name",{value:_newTarget.name,enumerable:!1}),target=_this,prototype=_newTarget.prototype,(setPrototypeOf=Object.setPrototypeOf)?setPrototypeOf(target,prototype):target.__proto__=prototype,fixStack(_this),_this}return function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}(CustomError,_super),CustomError}(Error);exports.CustomError=CustomError,exports.customErrorFactory=function(fn,parent){function CustomError(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(!(this instanceof CustomError))return new(CustomError.bind.apply(CustomError,[void 0].concat(args)));parent.apply(this,args),fn.apply(this,args),this.name=fn.name||parent.name,fixStack(this,CustomError)}return void 0===parent&&(parent=Error),Object.defineProperties(CustomError,{prototype:{value:Object.create(parent.prototype,{constructor:{value:CustomError,writable:!0,configurable:!0}})}})}});
{
"name": "ts-custom-error",
"version": "3.0.0",
"version": "3.1.0",
"description": "Extend native Error to create custom errors",

@@ -5,0 +5,0 @@ "repository": "github:adriengibrat/ts-custom-error",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet