@lskjs/err
Advanced tools
Comparing version 3.0.0-alpha.36 to 3.1.0-alpha.0
@@ -1,2 +0,2 @@ | ||
"use strict";var p=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var s=(o,t)=>{for(var n in t)p(o,n,{get:t[n],enumerable:!0})},y=(o,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of a(t))!i.call(o,f)&&f!==n&&p(o,f,{get:()=>t[f],enumerable:!(r=e(t,f))||r.enumerable});return o};var u=o=>y(p({},"__esModule",{value:!0}),o);var l={};s(l,{copyProps:()=>c,default:()=>E});module.exports=u(l);var c=(o,t)=>{typeof t!="string"&&Object.keys(t).forEach(n=>{let r=t[n];typeof r!="function"&&(o[n]=r)})},E=c;0&&(module.exports={copyProps}); | ||
"use strict";var e=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var p=(o,t)=>e(o,"name",{value:t,configurable:!0});var r=(o,t)=>{for(var f in t)e(o,f,{get:t[f],enumerable:!0})},y=(o,t,f,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of u(t))!a.call(o,c)&&c!==f&&e(o,c,{get:()=>t[c],enumerable:!(n=i(t,c))||n.enumerable});return o};var l=o=>y(e({},"__esModule",{value:!0}),o);var b={};r(b,{copyProps:()=>s,default:()=>x});module.exports=l(b);var s=p((o,t)=>{typeof t!="string"&&Object.keys(t).forEach(f=>{let n=t[f];typeof n!="function"&&(o[f]=n)})},"copyProps"),x=s;0&&(module.exports={copyProps}); | ||
//# sourceMappingURL=copyProps.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict";var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var O=(t,e)=>{for(var n in e)f(t,n,{get:e[n],enumerable:!0})},_=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of k(e))!w.call(t,o)&&o!==n&&f(t,o,{get:()=>e[o],enumerable:!(r=h(e,o))||r.enumerable});return t};var P=t=>_(f({},"__esModule",{value:!0}),t);var M={};O(M,{Err:()=>g,default:()=>S,isErr:()=>E});module.exports=P(M);var u=(t,e)=>{typeof e!="string"&&Object.keys(e).forEach(n=>{let r=e[n];typeof r!="function"&&(t[n]=r)})};var a=require("@lskjs/algos"),b=t=>t&&t.__err,N=t=>(0,a.pick)(t,Object.getOwnPropertyNames(t)),x=(t,e=["name","message","stack","text"])=>(0,a.isPlainObject)(t)?t:t instanceof Error?b(t)?N(t):(0,a.pick)(t,e):{};var d=(...t)=>{let[e,n]=t,r={};return typeof e=="string"&&(r.code=e,typeof n=="string"&&(r.message=n)),t.forEach(o=>{r={...r,...x(o)}}),r};var i=require("@lskjs/algos"),j=t=>Array.from(new Set(t)),s="err_unknown",c=(t,e=s)=>{if(typeof t=="string")return t;let n=t&&t.name!=="Error"?t.name:null;return t&&(t.message||t.text||t.code||n)||e},m=(t,e=s)=>{let n=[t.code,c(t),t.text,t.stack];return t&&j(n.filter(Boolean)).join(` | ||
`)||e||s},p=(t,e=s)=>t&&(t.code||t.text||t.message)||e,y=(t,e=!1)=>{if(typeof t=="string")return{code:t,message:t};let n={...t&&t.__raw||{}};return e?n={...n,...(0,i.pick)(t,["name","code","message","text","data"])}:n={...n,...(0,i.omit)((0,i.pick)(t,Object.getOwnPropertyNames(t)),["__err"])},n},l=t=>t instanceof Error;var E=t=>t instanceof g,g=class extends Error{code;__err=!0;constructor(...e){let n=d(...e);super(c(n)),this.name=this.constructor.name,Object.keys(n).forEach(r=>{let o=n[r];r==="message"?this.message!==o&&o&&(this.__parentErrorMessage=o):r==="stack"?this.__parentErrorStack=o:this[r]=o}),this.code||(this.code=p(n))}static getMessage(e,n=s){return c(e,n)}static getText(e,n=s){return m(e,n)}static getCode(e,n=s){return p(e,n)}static getJSON(e,n=!1){return y(e,n)}static isError(e){return l(e)}static isErr(e){return E(e)}static copyProps(e,n){u(e,n)}copyProps(e){u(this,e)}getText(){return m(this)}getJSON(e=!1){return y(this,e)}getMessage(){return c(this)}getCode(){return p(this)}toJSON(){return this.getJSON(!0)}},S=g;0&&(module.exports={Err,isErr}); | ||
"use strict";var g=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var o=(t,e)=>g(t,"name",{value:e,configurable:!0});var k=(t,e)=>{for(var s in e)g(t,s,{get:e[s],enumerable:!0})},N=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of y(e))!P.call(t,n)&&n!==s&&g(t,n,{get:()=>e[n],enumerable:!(r=_(e,n))||r.enumerable});return t};var j=t=>N(g({},"__esModule",{value:!0}),t);var b={};k(b,{Err:()=>i,default:()=>J,isErr:()=>O});module.exports=j(b);var m=o((t,e)=>{typeof e!="string"&&Object.keys(e).forEach(s=>{let r=e[s];typeof r!="function"&&(t[s]=r)})},"copyProps");var c=require("@lskjs/algos");var S=o(t=>t&&t.__err,"isLskError"),w=o(t=>(0,c.pick)(t,Object.getOwnPropertyNames(t)),"getLskErrorProps"),d=o((t,e=["name","message","stack","text"])=>(0,c.isPlainObject)(t)?t:t instanceof Error?S(t)?w(t):(0,c.pick)(t,e):{},"errProps");var h=o((...t)=>{let[e,s]=t,r={};return typeof e=="string"&&(r.code=e,typeof s=="string"&&(r.message=s)),t.forEach(n=>{r={...r,...d(n)}}),r},"errMerge");var p=require("@lskjs/algos");var M=o(t=>Array.from(new Set(t)),"uniq"),a="err_unknown",f=o((t,e=a)=>{if(typeof t=="string")return t;let s=t&&t.name!=="Error"?t.name:null;return t&&(t.message||t.text||t.code||s)||e},"getMessage"),x=o((t,e=a)=>{let s=[t.code,f(t),t.text,t.stack];return t&&M(s.filter(Boolean)).join(` | ||
`)||e||a},"getText"),u=o((t,e=a)=>t&&(t.code||t.text||t.message)||e,"getCode"),l=o((t,e=!1)=>{if(typeof t=="string")return{code:t,message:t};let s={...t&&t.__raw||{}};return e?s={...s,...(0,p.pick)(t,["name","code","message","text","data"])}:s={...s,...(0,p.omit)((0,p.pick)(t,Object.getOwnPropertyNames(t)),["__err"])},s},"getJSON"),E=o(t=>t instanceof Error,"isError");var O=o(t=>t instanceof i,"isErr"),i=class extends Error{__err=!0;constructor(...e){let s=h(...e);super(f(s)),this.name=this.constructor.name,Object.keys(s).forEach(r=>{let n=s[r];r==="message"?this.message!==n&&n&&(this.__parentErrorMessage=n):r==="stack"?this.__parentErrorStack=n:this[r]=n}),this.code||(this.code=u(s))}static getMessage(e,s=a){return f(e,s)}static getText(e,s=a){return x(e,s)}static getCode(e,s=a){return u(e,s)}static getJSON(e,s=!1){return l(e,s)}static isError(e){return E(e)}static isErr(e){return O(e)}static copyProps(e,s){m(e,s)}copyProps(e){m(this,e)}getText(){return x(this)}getJSON(e=!1){return l(this,e)}getMessage(){return f(this)}getCode(){return u(this)}toJSON(){return this.getJSON(!0)}};o(i,"Err");var J=i;0&&(module.exports={Err,isErr}); | ||
//# sourceMappingURL=Err.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var g=(r,t)=>{for(var e in t)a(r,e,{get:t[e],enumerable:!0})},u=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!m.call(r,o)&&o!==e&&a(r,o,{get:()=>t[o],enumerable:!(n=c(t,o))||n.enumerable});return r};var y=r=>u(a({},"__esModule",{value:!0}),r);var P={};g(P,{default:()=>d,errMerge:()=>p});module.exports=y(P);var s=require("@lskjs/algos"),x=r=>r&&r.__err,k=r=>(0,s.pick)(r,Object.getOwnPropertyNames(r)),i=(r,t=["name","message","stack","text"])=>(0,s.isPlainObject)(r)?r:r instanceof Error?x(r)?k(r):(0,s.pick)(r,t):{};var p=(...r)=>{let[t,e]=r,n={};return typeof t=="string"&&(n.code=t,typeof e=="string"&&(n.message=e)),r.forEach(o=>{n={...n,...i(o)}}),n},d=p;0&&(module.exports={errMerge}); | ||
"use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var p=(r,t)=>a(r,"name",{value:t,configurable:!0});var x=(r,t)=>{for(var o in t)a(r,o,{get:t[o],enumerable:!0})},g=(r,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of m(t))!u.call(r,s)&&s!==o&&a(r,s,{get:()=>t[s],enumerable:!(e=c(t,s))||e.enumerable});return r};var P=r=>g(a({},"__esModule",{value:!0}),r);var d={};x(d,{default:()=>E,errMerge:()=>f});module.exports=P(d);var n=require("@lskjs/algos");var k=p(r=>r&&r.__err,"isLskError"),l=p(r=>(0,n.pick)(r,Object.getOwnPropertyNames(r)),"getLskErrorProps"),i=p((r,t=["name","message","stack","text"])=>(0,n.isPlainObject)(r)?r:r instanceof Error?k(r)?l(r):(0,n.pick)(r,t):{},"errProps");var f=p((...r)=>{let[t,o]=r,e={};return typeof t=="string"&&(e.code=t,typeof o=="string"&&(e.message=o)),r.forEach(s=>{e={...e,...i(s)}}),e},"errMerge"),E=f;0&&(module.exports={errMerge}); | ||
//# sourceMappingURL=errMerge.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var k=(t,n)=>{for(var e in n)s(t,e,{get:n[e],enumerable:!0})},m=(t,n,e,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of u(n))!g.call(t,r)&&r!==e&&s(t,r,{get:()=>n[r],enumerable:!(i=f(n,r))||i.enumerable});return t};var x=t=>m(s({},"__esModule",{value:!0}),t);var P={};k(P,{default:()=>y,errProps:()=>p,getLskErrorProps:()=>c,isLskError:()=>a});module.exports=x(P);var o=require("@lskjs/algos"),a=t=>t&&t.__err,c=t=>(0,o.pick)(t,Object.getOwnPropertyNames(t)),p=(t,n=["name","message","stack","text"])=>(0,o.isPlainObject)(t)?t:t instanceof Error?a(t)?c(t):(0,o.pick)(t,n):{},y=p;0&&(module.exports={errProps,getLskErrorProps,isLskError}); | ||
"use strict";var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var i=(t,r)=>n(t,"name",{value:r,configurable:!0});var k=(t,r)=>{for(var s in r)n(t,s,{get:r[s],enumerable:!0})},P=(t,r,s,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of u(r))!x.call(t,o)&&o!==s&&n(t,o,{get:()=>r[o],enumerable:!(p=m(r,o))||p.enumerable});return t};var g=t=>P(n({},"__esModule",{value:!0}),t);var O={};k(O,{default:()=>E,errProps:()=>f,getLskErrorProps:()=>a,isLskError:()=>c});module.exports=g(O);var e=require("@lskjs/algos");var c=i(t=>t&&t.__err,"isLskError"),a=i(t=>(0,e.pick)(t,Object.getOwnPropertyNames(t)),"getLskErrorProps"),f=i((t,r=["name","message","stack","text"])=>(0,e.isPlainObject)(t)?t:t instanceof Error?c(t)?a(t):(0,e.pick)(t,r):{},"errProps"),E=f;0&&(module.exports={errProps,getLskErrorProps,isLskError}); | ||
//# sourceMappingURL=errProps.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict";var u=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var b=(t,e)=>{for(var r in e)u(t,r,{get:e[r],enumerable:!0})},N=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _(e))!P.call(t,o)&&o!==r&&u(t,o,{get:()=>e[o],enumerable:!(n=O(e,o))||n.enumerable});return t};var j=t=>N(u({},"__esModule",{value:!0}),t);var M={};b(M,{Err:()=>g,default:()=>w,errMerge:()=>d,errProps:()=>x,errUnknown:()=>s,getCode:()=>p,getJSON:()=>m,getLskErrorProps:()=>h,getMessage:()=>a,getText:()=>f,isErr:()=>k,isError:()=>l,isLskError:()=>E});module.exports=j(M);var y=(t,e)=>{typeof e!="string"&&Object.keys(e).forEach(r=>{let n=e[r];typeof n!="function"&&(t[r]=n)})};var i=require("@lskjs/algos"),E=t=>t&&t.__err,h=t=>(0,i.pick)(t,Object.getOwnPropertyNames(t)),x=(t,e=["name","message","stack","text"])=>(0,i.isPlainObject)(t)?t:t instanceof Error?E(t)?h(t):(0,i.pick)(t,e):{};var d=(...t)=>{let[e,r]=t,n={};return typeof e=="string"&&(n.code=e,typeof r=="string"&&(n.message=r)),t.forEach(o=>{n={...n,...x(o)}}),n};var c=require("@lskjs/algos"),S=t=>Array.from(new Set(t)),s="err_unknown",a=(t,e=s)=>{if(typeof t=="string")return t;let r=t&&t.name!=="Error"?t.name:null;return t&&(t.message||t.text||t.code||r)||e},f=(t,e=s)=>{let r=[t.code,a(t),t.text,t.stack];return t&&S(r.filter(Boolean)).join(` | ||
`)||e||s},p=(t,e=s)=>t&&(t.code||t.text||t.message)||e,m=(t,e=!1)=>{if(typeof t=="string")return{code:t,message:t};let r={...t&&t.__raw||{}};return e?r={...r,...(0,c.pick)(t,["name","code","message","text","data"])}:r={...r,...(0,c.omit)((0,c.pick)(t,Object.getOwnPropertyNames(t)),["__err"])},r},l=t=>t instanceof Error;var k=t=>t instanceof g,g=class extends Error{code;__err=!0;constructor(...e){let r=d(...e);super(a(r)),this.name=this.constructor.name,Object.keys(r).forEach(n=>{let o=r[n];n==="message"?this.message!==o&&o&&(this.__parentErrorMessage=o):n==="stack"?this.__parentErrorStack=o:this[n]=o}),this.code||(this.code=p(r))}static getMessage(e,r=s){return a(e,r)}static getText(e,r=s){return f(e,r)}static getCode(e,r=s){return p(e,r)}static getJSON(e,r=!1){return m(e,r)}static isError(e){return l(e)}static isErr(e){return k(e)}static copyProps(e,r){y(e,r)}copyProps(e){y(this,e)}getText(){return f(this)}getJSON(e=!1){return m(this,e)}getMessage(){return a(this)}getCode(){return p(this)}toJSON(){return this.getJSON(!0)}},w=g;0&&(module.exports={Err,errMerge,errProps,errUnknown,getCode,getJSON,getLskErrorProps,getMessage,getText,isErr,isError,isLskError}); | ||
"use strict";var m=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var r=(t,e)=>m(t,"name",{value:e,configurable:!0});var S=(t,e)=>{for(var o in e)m(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of N(e))!j.call(t,n)&&n!==o&&m(t,n,{get:()=>e[n],enumerable:!(s=k(e,n))||s.enumerable});return t};var M=t=>w(m({},"__esModule",{value:!0}),t);var b={};S(b,{Err:()=>c,default:()=>P,errMerge:()=>h,errProps:()=>d,errUnknown:()=>a,getCode:()=>g,getJSON:()=>x,getLskErrorProps:()=>_,getMessage:()=>i,getText:()=>u,isErr:()=>y,isError:()=>E,isLskError:()=>O});module.exports=M(b);var l=r((t,e)=>{typeof e!="string"&&Object.keys(e).forEach(o=>{let s=e[o];typeof s!="function"&&(t[o]=s)})},"copyProps");var p=require("@lskjs/algos");var O=r(t=>t&&t.__err,"isLskError"),_=r(t=>(0,p.pick)(t,Object.getOwnPropertyNames(t)),"getLskErrorProps"),d=r((t,e=["name","message","stack","text"])=>(0,p.isPlainObject)(t)?t:t instanceof Error?O(t)?_(t):(0,p.pick)(t,e):{},"errProps");var h=r((...t)=>{let[e,o]=t,s={};return typeof e=="string"&&(s.code=e,typeof o=="string"&&(s.message=o)),t.forEach(n=>{s={...s,...d(n)}}),s},"errMerge");var f=require("@lskjs/algos");var J=r(t=>Array.from(new Set(t)),"uniq"),a="err_unknown",i=r((t,e=a)=>{if(typeof t=="string")return t;let o=t&&t.name!=="Error"?t.name:null;return t&&(t.message||t.text||t.code||o)||e},"getMessage"),u=r((t,e=a)=>{let o=[t.code,i(t),t.text,t.stack];return t&&J(o.filter(Boolean)).join(` | ||
`)||e||a},"getText"),g=r((t,e=a)=>t&&(t.code||t.text||t.message)||e,"getCode"),x=r((t,e=!1)=>{if(typeof t=="string")return{code:t,message:t};let o={...t&&t.__raw||{}};return e?o={...o,...(0,f.pick)(t,["name","code","message","text","data"])}:o={...o,...(0,f.omit)((0,f.pick)(t,Object.getOwnPropertyNames(t)),["__err"])},o},"getJSON"),E=r(t=>t instanceof Error,"isError");var y=r(t=>t instanceof c,"isErr"),c=class extends Error{__err=!0;constructor(...e){let o=h(...e);super(i(o)),this.name=this.constructor.name,Object.keys(o).forEach(s=>{let n=o[s];s==="message"?this.message!==n&&n&&(this.__parentErrorMessage=n):s==="stack"?this.__parentErrorStack=n:this[s]=n}),this.code||(this.code=g(o))}static getMessage(e,o=a){return i(e,o)}static getText(e,o=a){return u(e,o)}static getCode(e,o=a){return g(e,o)}static getJSON(e,o=!1){return x(e,o)}static isError(e){return E(e)}static isErr(e){return y(e)}static copyProps(e,o){l(e,o)}copyProps(e){l(this,e)}getText(){return u(this)}getJSON(e=!1){return x(this,e)}getMessage(){return i(this)}getCode(){return g(this)}toJSON(){return this.getJSON(!0)}};r(c,"Err");var P=c;0&&(module.exports={Err,errMerge,errProps,errUnknown,getCode,getJSON,getLskErrorProps,getMessage,getText,isErr,isError,isLskError}); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var a=(n,e,g,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of i(e))!d.call(n,r)&&r!==g&&o(n,r,{get:()=>e[r],enumerable:!(t=s(e,r))||t.enumerable});return n};var c=n=>a(o({},"__esModule",{value:!0}),n);var l={};module.exports=c(l); | ||
"use strict";var t=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(o,e,x,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of b(e))!c.call(o,p)&&p!==x&&t(o,p,{get:()=>e[p],enumerable:!(r=a(e,p))||r.enumerable});return o};var f=o=>d(t({},"__esModule",{value:!0}),o);var g={};module.exports=f(g); | ||
//# sourceMappingURL=types.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict";var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var y=(t,n)=>{for(var o in n)c(t,o,{get:n[o],enumerable:!0})},f=(t,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of p(n))!x.call(t,e)&&e!==o&&c(t,e,{get:()=>n[e],enumerable:!(i=m(n,e))||i.enumerable});return t};var d=t=>f(c({},"__esModule",{value:!0}),t);var _={};y(_,{errUnknown:()=>a,getCode:()=>r,getJSON:()=>w,getMessage:()=>g,getText:()=>l,isError:()=>k});module.exports=d(_);var s=require("@lskjs/algos"),u=t=>Array.from(new Set(t)),a="err_unknown",g=(t,n=a)=>{if(typeof t=="string")return t;let o=t&&t.name!=="Error"?t.name:null;return t&&(t.message||t.text||t.code||o)||n},l=(t,n=a)=>{let o=[t.code,g(t),t.text,t.stack];return t&&u(o.filter(Boolean)).join(` | ||
`)||n||a},r=(t,n=a)=>t&&(t.code||t.text||t.message)||n,w=(t,n=!1)=>{if(typeof t=="string")return{code:t,message:t};let o={...t&&t.__raw||{}};return n?o={...o,...(0,s.pick)(t,["name","code","message","text","data"])}:o={...o,...(0,s.omit)((0,s.pick)(t,Object.getOwnPropertyNames(t)),["__err"])},o},k=t=>t instanceof Error;0&&(module.exports={errUnknown,getCode,getJSON,getMessage,getText,isError}); | ||
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var n=(t,e)=>i(t,"name",{value:e,configurable:!0});var d=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},u=(t,e,o,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of x(e))!f.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(m=p(e,s))||m.enumerable});return t};var l=t=>u(i({},"__esModule",{value:!0}),t);var N={};d(N,{errUnknown:()=>c,getCode:()=>_,getJSON:()=>k,getMessage:()=>g,getText:()=>y,isError:()=>E});module.exports=l(N);var a=require("@lskjs/algos");var w=n(t=>Array.from(new Set(t)),"uniq"),c="err_unknown",g=n((t,e=c)=>{if(typeof t=="string")return t;let o=t&&t.name!=="Error"?t.name:null;return t&&(t.message||t.text||t.code||o)||e},"getMessage"),y=n((t,e=c)=>{let o=[t.code,g(t),t.text,t.stack];return t&&w(o.filter(Boolean)).join(` | ||
`)||e||c},"getText"),_=n((t,e=c)=>t&&(t.code||t.text||t.message)||e,"getCode"),k=n((t,e=!1)=>{if(typeof t=="string")return{code:t,message:t};let o={...t&&t.__raw||{}};return e?o={...o,...(0,a.pick)(t,["name","code","message","text","data"])}:o={...o,...(0,a.omit)((0,a.pick)(t,Object.getOwnPropertyNames(t)),["__err"])},o},"getJSON"),E=n(t=>t instanceof Error,"isError");0&&(module.exports={errUnknown,getCode,getJSON,getMessage,getText,isError}); | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@lskjs/err", | ||
"version": "3.0.0-alpha.36", | ||
"version": "3.1.0-alpha.0", | ||
"description": "LSK.js – err – Error class and utils for custom code and message extracting", | ||
"author": "Igor Suvorov <hi@isuvorov.com> (https://github.com/isuvorov)", | ||
"dependencies": { | ||
"@lskjs/algos": "^3.0.0-alpha.36" | ||
"@lskjs/algos": "^3.1.0-alpha.0" | ||
}, | ||
@@ -40,3 +40,3 @@ "files": [ | ||
], | ||
"gitHead": "519056cccf5e2729c8a87d49e99eaca817d9da26" | ||
"gitHead": "223ba1b4c6cb5b0bfa15ffdd440c4eb6fe8cb947" | ||
} |
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
152422
122
Updated@lskjs/algos@^3.1.0-alpha.0