@alessiofrittoli/exception 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Exception 🚦
2
2
 
3
- Version 1.0.0
3
+ Version 1.1.0
4
4
 
5
5
  ## Handle errors with ease
6
6
 
package/dist/index.d.mts CHANGED
@@ -7,6 +7,7 @@ declare class Exception<TMessage = string, TCode = number> extends Error impleme
7
7
  message: TMessage;
8
8
  status: number | undefined;
9
9
  name: string;
10
+ typename: 'Exception';
10
11
  code: TCode;
11
12
  constructor(message: TMessage, options: ExceptionOptions<TCode>);
12
13
  static isException<TMessage = string, TCode = number>(error: any): error is Exception<TMessage, TCode>;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ declare class Exception<TMessage = string, TCode = number> extends Error impleme
7
7
  message: TMessage;
8
8
  status: number | undefined;
9
9
  name: string;
10
+ typename: 'Exception';
10
11
  code: TCode;
11
12
  constructor(message: TMessage, options: ExceptionOptions<TCode>);
12
13
  static isException<TMessage = string, TCode = number>(error: any): error is Exception<TMessage, TCode>;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var t=class n extends Error{message;status;name;code;constructor(s,e){super("",e),this.name=e.name||"Exception",this.message=s,this.code=e.code,this.status=e.status;}static isException(s){return s instanceof n}},o=t;module.exports=o;
1
+ 'use strict';var s=class n extends Error{message;status;name;typename;code;constructor(e,t){super("",t),this.typename="Exception",this.name=t.name||this.typename,this.message=e,this.code=t.code,this.status=t.status;}static isException(e){return e instanceof n||typeof e=="object"&&"typename"in e&&e.typename==="Exception"}},i=s;module.exports=i;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var t=class n extends Error{message;status;name;code;constructor(s,e){super("",e),this.name=e.name||"Exception",this.message=s,this.code=e.code,this.status=e.status;}static isException(s){return s instanceof n}},a=t;export{a as default};
1
+ var s=class n extends Error{message;status;name;typename;code;constructor(e,t){super("",t),this.typename="Exception",this.name=t.name||this.typename,this.message=e,this.code=t.code,this.status=t.status;}static isException(e){return e instanceof n||typeof e=="object"&&"typename"in e&&e.typename==="Exception"}},o=s;export{o as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alessiofrittoli/exception",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Handle errors with ease",
5
5
  "author": {
6
6
  "name": "Alessio Frittoli",