ts-pattern
Advanced tools
Comparing version 5.3.0 to 5.3.1
@@ -5,5 +5,5 @@ /** | ||
*/ | ||
export declare class ExhaustiveError extends Error { | ||
export declare class NonExhaustiveError extends Error { | ||
input: unknown; | ||
constructor(input: unknown); | ||
} |
@@ -5,2 +5,2 @@ import * as Pattern from './patterns.js'; | ||
export { Pattern, Pattern as P }; | ||
export { ExhaustiveError } from './errors.js'; | ||
export { NonExhaustiveError } from './errors.js'; |
@@ -1,2 +0,2 @@ | ||
const t=Symbol.for("@ts-pattern/matcher"),e=Symbol.for("@ts-pattern/isVariadic"),n="@ts-pattern/anonymous-select-key",r=t=>Boolean(t&&"object"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&"optional"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:"optional"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:"and"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:"or"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r="string"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return"number"==typeof t}function b(t){return"string"==typeof t}function w(t){return"bigint"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return"boolean"==typeof t})),B=u(p(function(t){return"symbol"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&"function"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as ExhaustiveError,N as P,N as Pattern,a as isMatching,z as match}; | ||
const t=Symbol.for("@ts-pattern/matcher"),e=Symbol.for("@ts-pattern/isVariadic"),n="@ts-pattern/anonymous-select-key",r=t=>Boolean(t&&"object"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&"optional"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:"optional"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:"and"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:"or"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r="string"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return"number"==typeof t}function b(t){return"string"==typeof t}function w(t){return"bigint"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return"boolean"==typeof t})),B=u(p(function(t){return"symbol"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&"function"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as NonExhaustiveError,N as P,N as Pattern,a as isMatching,z as match}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n||self).tsPattern={})}(this,function(n){function t(n){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},t(n)}function e(n,t){return e=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},e(n,t)}function r(n,t,u){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}()?Reflect.construct:function(n,t,r){var u=[null];u.push.apply(u,t);var i=new(Function.bind.apply(n,u));return r&&e(i,r.prototype),i},r.apply(null,arguments)}function u(n){var i="function"==typeof Map?new Map:void 0;return u=function(n){if(null===n||-1===Function.toString.call(n).indexOf("[native code]"))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(n))return i.get(n);i.set(n,u)}function u(){return r(n,arguments,t(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),e(u,n)},u(n)}function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function o(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return i(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=Symbol.for("@ts-pattern/matcher"),f=Symbol.for("@ts-pattern/isVariadic"),a="@ts-pattern/anonymous-select-key",l=function(n){return Boolean(n&&"object"==typeof n)},s=function(n){return n&&!!n[c]},h=function n(t,e,r){if(s(t)){var u=t[c]().match(e),i=u.matched,a=u.selections;return i&&a&&Object.keys(a).forEach(function(n){return r(n,a[n])}),i}if(l(t)){if(!l(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;for(var h,v=[],p=[],y=[],g=o(t.keys());!(h=g()).done;){var d=t[h.value];s(d)&&d[f]?y.push(d):y.length?p.push(d):v.push(d)}if(y.length){if(y.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<v.length+p.length)return!1;var m=e.slice(0,v.length),b=0===p.length?[]:e.slice(-p.length),w=e.slice(v.length,0===p.length?Infinity:-p.length);return v.every(function(t,e){return n(t,m[e],r)})&&p.every(function(t,e){return n(t,b[e],r)})&&(0===y.length||n(y[0],w,r))}return t.length===e.length&&t.every(function(t,u){return n(t,e[u],r)})}return Reflect.ownKeys(t).every(function(u){var i,o=t[u];return(u in e||s(i=o)&&"optional"===i[c]().matcherType)&&n(o,e[u],r)})}return Object.is(e,t)},v=function n(t){var e,r,u;return l(t)?s(t)?null!=(e=null==(r=(u=t[c]()).getSelectionKeys)?void 0:r.call(u))?e:[]:Array.isArray(t)?p(t,n):p(Object.values(t),n):[]},p=function(n,t){return n.reduce(function(n,e){return n.concat(t(e))},[])};function y(){var n=[].slice.call(arguments);if(1===n.length){var t=n[0];return function(n){return h(t,n,function(){})}}if(2===n.length)return h(n[0],n[1],function(){});throw new Error("isMatching wasn't given the right number of arguments: expected 1 or 2, received "+n.length+".")}function g(n){return Object.assign(n,{optional:function(){return m(n)},and:function(t){return O(n,t)},or:function(t){return S(n,t)},select:function(t){return void 0===t?x(n):x(t,n)}})}function d(n){return Object.assign(function(n){var t;return Object.assign(n,((t={})[Symbol.iterator]=function(){var t,e=0,r=[{value:Object.assign(n,((t={})[f]=!0,t)),done:!1},{done:!0,value:void 0}];return{next:function(){var n;return null!=(n=r[e++])?n:r.at(-1)}}},t))}(n),{optional:function(){return d(m(n))},select:function(t){return d(void 0===t?x(n):x(t,n))}})}function m(n){var t;return g(((t={})[c]=function(){return{match:function(t){var e={},r=function(n,t){e[n]=t};return void 0===t?(v(n).forEach(function(n){return r(n,void 0)}),{matched:!0,selections:e}):{matched:h(n,t,r),selections:e}},getSelectionKeys:function(){return v(n)},matcherType:"optional"}},t))}var b=function(n,t){for(var e,r=o(n);!(e=r()).done;)if(!t(e.value))return!1;return!0},w=function(n,t){for(var e,r=o(n.entries());!(e=r()).done;){var u=e.value;if(!t(u[1],u[0]))return!1}return!0};function O(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){var e={},r=function(n,t){e[n]=t};return{matched:t.every(function(t){return h(t,n,r)}),selections:e}},getSelectionKeys:function(){return p(t,v)},matcherType:"and"}},n))}function S(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){var e={},r=function(n,t){e[n]=t};return p(t,v).forEach(function(n){return r(n,void 0)}),{matched:t.some(function(t){return h(t,n,r)}),selections:e}},getSelectionKeys:function(){return p(t,v)},matcherType:"or"}},n))}function j(n){var t;return(t={})[c]=function(){return{match:function(t){return{matched:Boolean(n(t))}}}},t}function x(){var n,t=[].slice.call(arguments),e="string"==typeof t[0]?t[0]:void 0,r=2===t.length?t[1]:"string"==typeof t[0]?void 0:t[0];return g(((n={})[c]=function(){return{match:function(n){var t,u=((t={})[null!=e?e:a]=n,t);return{matched:void 0===r||h(r,n,function(n,t){u[n]=t}),selections:u}},getSelectionKeys:function(){return[null!=e?e:a].concat(void 0===r?[]:v(r))}}},n))}function A(n){return"number"==typeof n}function E(n){return"string"==typeof n}function _(n){return"bigint"==typeof n}var P=g(j(function(n){return!0})),K=P,T=function n(t){return Object.assign(g(t),{startsWith:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&n.startsWith(r)}))));var r},endsWith:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&n.endsWith(r)}))));var r},minLength:function(e){return n(O(t,function(n){return j(function(t){return E(t)&&t.length>=n})}(e)))},length:function(e){return n(O(t,function(n){return j(function(t){return E(t)&&t.length===n})}(e)))},maxLength:function(e){return n(O(t,function(n){return j(function(t){return E(t)&&t.length<=n})}(e)))},includes:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&n.includes(r)}))));var r},regex:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&Boolean(n.match(r))}))));var r}})}(j(E)),B=function n(t){return Object.assign(g(t),{between:function(e,r){return n(O(t,function(n,t){return j(function(e){return A(e)&&n<=e&&t>=e})}(e,r)))},lt:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t<n})}(e)))},gt:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t>n})}(e)))},lte:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t<=n})}(e)))},gte:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t>=n})}(e)))},int:function(){return n(O(t,j(function(n){return A(n)&&Number.isInteger(n)})))},finite:function(){return n(O(t,j(function(n){return A(n)&&Number.isFinite(n)})))},positive:function(){return n(O(t,j(function(n){return A(n)&&n>0})))},negative:function(){return n(O(t,j(function(n){return A(n)&&n<0})))}})}(j(A)),M=function n(t){return Object.assign(g(t),{between:function(e,r){return n(O(t,function(n,t){return j(function(e){return _(e)&&n<=e&&t>=e})}(e,r)))},lt:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t<n})}(e)))},gt:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t>n})}(e)))},lte:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t<=n})}(e)))},gte:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t>=n})}(e)))},positive:function(){return n(O(t,j(function(n){return _(n)&&n>0})))},negative:function(){return n(O(t,j(function(n){return _(n)&&n<0})))}})}(j(_)),R=g(j(function(n){return"boolean"==typeof n})),I=g(j(function(n){return"symbol"==typeof n})),k=g(j(function(n){return null==n})),N=g(j(function(n){return null!=n})),W={__proto__:null,matcher:c,optional:m,array:function(){var n,t=[].slice.call(arguments);return d(((n={})[c]=function(){return{match:function(n){if(!Array.isArray(n))return{matched:!1};if(0===t.length)return{matched:!0};var e=t[0],r={};if(0===n.length)return v(e).forEach(function(n){r[n]=[]}),{matched:!0,selections:r};var u=function(n,t){r[n]=(r[n]||[]).concat([t])};return{matched:n.every(function(n){return h(e,n,u)}),selections:r}},getSelectionKeys:function(){return 0===t.length?[]:v(t[0])}}},n))},set:function(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){if(!(n instanceof Set))return{matched:!1};var e={};if(0===n.size)return{matched:!0,selections:e};if(0===t.length)return{matched:!0};var r=function(n,t){e[n]=(e[n]||[]).concat([t])},u=t[0];return{matched:b(n,function(n){return h(u,n,r)}),selections:e}},getSelectionKeys:function(){return 0===t.length?[]:v(t[0])}}},n))},map:function(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){if(!(n instanceof Map))return{matched:!1};var e={};if(0===n.size)return{matched:!0,selections:e};var r,u=function(n,t){e[n]=(e[n]||[]).concat([t])};if(0===t.length)return{matched:!0};if(1===t.length)throw new Error("`P.map` wasn't given enough arguments. Expected (key, value), received "+(null==(r=t[0])?void 0:r.toString()));var i=t[0],o=t[1];return{matched:w(n,function(n,t){var e=h(i,t,u),r=h(o,n,u);return e&&r}),selections:e}},getSelectionKeys:function(){return 0===t.length?[]:[].concat(v(t[0]),v(t[1]))}}},n))},intersection:O,union:S,not:function(n){var t;return g(((t={})[c]=function(){return{match:function(t){return{matched:!h(n,t,function(){})}},getSelectionKeys:function(){return[]},matcherType:"not"}},t))},when:j,select:x,any:P,_:K,string:T,number:B,bigint:M,boolean:R,symbol:I,nullish:k,nonNullable:N,instanceOf:function(n){return g(j(function(n){return function(t){return t instanceof n}}(n)))},shape:function(n){return g(j(y(n)))}},F=/*#__PURE__*/function(n){var t,r;function u(t){var e,r;try{r=JSON.stringify(t)}catch(n){r=t}return(e=n.call(this,"Pattern matching error: no pattern matches value "+r)||this).input=void 0,e.input=t,e}return r=n,(t=u).prototype=Object.create(r.prototype),t.prototype.constructor=t,e(t,r),u}(/*#__PURE__*/u(Error)),z={matched:!1,value:void 0},L=/*#__PURE__*/function(){function n(n,t){this.input=void 0,this.state=void 0,this.input=n,this.state=t}var t=n.prototype;return t.with=function(){var t=this,e=[].slice.call(arguments);if(this.state.matched)return this;var r=e[e.length-1],u=[e[0]],i=void 0;3===e.length&&"function"==typeof e[1]?i=e[1]:e.length>2&&u.push.apply(u,e.slice(1,e.length-1));var o=!1,c={},f=function(n,t){o=!0,c[n]=t},l=!u.some(function(n){return h(n,t.input,f)})||i&&!Boolean(i(this.input))?z:{matched:!0,value:r(o?a in c?c[a]:c:this.input,this.input)};return new n(this.input,l)},t.when=function(t,e){if(this.state.matched)return this;var r=Boolean(t(this.input));return new n(this.input,r?{matched:!0,value:e(this.input,this.input)}:z)},t.otherwise=function(n){return this.state.matched?this.state.value:n(this.input)},t.exhaustive=function(){if(this.state.matched)return this.state.value;throw new F(this.input)},t.run=function(){return this.exhaustive()},t.returnType=function(){return this},n}();n.ExhaustiveError=F,n.P=W,n.Pattern=W,n.isMatching=y,n.match=function(n){return new L(n,z)}}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n||self).tsPattern={})}(this,function(n){function t(n){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},t(n)}function e(n,t){return e=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},e(n,t)}function r(n,t,u){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}()?Reflect.construct:function(n,t,r){var u=[null];u.push.apply(u,t);var i=new(Function.bind.apply(n,u));return r&&e(i,r.prototype),i},r.apply(null,arguments)}function u(n){var i="function"==typeof Map?new Map:void 0;return u=function(n){if(null===n||-1===Function.toString.call(n).indexOf("[native code]"))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(n))return i.get(n);i.set(n,u)}function u(){return r(n,arguments,t(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),e(u,n)},u(n)}function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function o(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return i(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=Symbol.for("@ts-pattern/matcher"),f=Symbol.for("@ts-pattern/isVariadic"),a="@ts-pattern/anonymous-select-key",l=function(n){return Boolean(n&&"object"==typeof n)},s=function(n){return n&&!!n[c]},h=function n(t,e,r){if(s(t)){var u=t[c]().match(e),i=u.matched,a=u.selections;return i&&a&&Object.keys(a).forEach(function(n){return r(n,a[n])}),i}if(l(t)){if(!l(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;for(var h,v=[],p=[],y=[],g=o(t.keys());!(h=g()).done;){var d=t[h.value];s(d)&&d[f]?y.push(d):y.length?p.push(d):v.push(d)}if(y.length){if(y.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<v.length+p.length)return!1;var m=e.slice(0,v.length),b=0===p.length?[]:e.slice(-p.length),w=e.slice(v.length,0===p.length?Infinity:-p.length);return v.every(function(t,e){return n(t,m[e],r)})&&p.every(function(t,e){return n(t,b[e],r)})&&(0===y.length||n(y[0],w,r))}return t.length===e.length&&t.every(function(t,u){return n(t,e[u],r)})}return Reflect.ownKeys(t).every(function(u){var i,o=t[u];return(u in e||s(i=o)&&"optional"===i[c]().matcherType)&&n(o,e[u],r)})}return Object.is(e,t)},v=function n(t){var e,r,u;return l(t)?s(t)?null!=(e=null==(r=(u=t[c]()).getSelectionKeys)?void 0:r.call(u))?e:[]:Array.isArray(t)?p(t,n):p(Object.values(t),n):[]},p=function(n,t){return n.reduce(function(n,e){return n.concat(t(e))},[])};function y(){var n=[].slice.call(arguments);if(1===n.length){var t=n[0];return function(n){return h(t,n,function(){})}}if(2===n.length)return h(n[0],n[1],function(){});throw new Error("isMatching wasn't given the right number of arguments: expected 1 or 2, received "+n.length+".")}function g(n){return Object.assign(n,{optional:function(){return m(n)},and:function(t){return O(n,t)},or:function(t){return S(n,t)},select:function(t){return void 0===t?x(n):x(t,n)}})}function d(n){return Object.assign(function(n){var t;return Object.assign(n,((t={})[Symbol.iterator]=function(){var t,e=0,r=[{value:Object.assign(n,((t={})[f]=!0,t)),done:!1},{done:!0,value:void 0}];return{next:function(){var n;return null!=(n=r[e++])?n:r.at(-1)}}},t))}(n),{optional:function(){return d(m(n))},select:function(t){return d(void 0===t?x(n):x(t,n))}})}function m(n){var t;return g(((t={})[c]=function(){return{match:function(t){var e={},r=function(n,t){e[n]=t};return void 0===t?(v(n).forEach(function(n){return r(n,void 0)}),{matched:!0,selections:e}):{matched:h(n,t,r),selections:e}},getSelectionKeys:function(){return v(n)},matcherType:"optional"}},t))}var b=function(n,t){for(var e,r=o(n);!(e=r()).done;)if(!t(e.value))return!1;return!0},w=function(n,t){for(var e,r=o(n.entries());!(e=r()).done;){var u=e.value;if(!t(u[1],u[0]))return!1}return!0};function O(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){var e={},r=function(n,t){e[n]=t};return{matched:t.every(function(t){return h(t,n,r)}),selections:e}},getSelectionKeys:function(){return p(t,v)},matcherType:"and"}},n))}function S(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){var e={},r=function(n,t){e[n]=t};return p(t,v).forEach(function(n){return r(n,void 0)}),{matched:t.some(function(t){return h(t,n,r)}),selections:e}},getSelectionKeys:function(){return p(t,v)},matcherType:"or"}},n))}function j(n){var t;return(t={})[c]=function(){return{match:function(t){return{matched:Boolean(n(t))}}}},t}function x(){var n,t=[].slice.call(arguments),e="string"==typeof t[0]?t[0]:void 0,r=2===t.length?t[1]:"string"==typeof t[0]?void 0:t[0];return g(((n={})[c]=function(){return{match:function(n){var t,u=((t={})[null!=e?e:a]=n,t);return{matched:void 0===r||h(r,n,function(n,t){u[n]=t}),selections:u}},getSelectionKeys:function(){return[null!=e?e:a].concat(void 0===r?[]:v(r))}}},n))}function A(n){return"number"==typeof n}function E(n){return"string"==typeof n}function _(n){return"bigint"==typeof n}var P=g(j(function(n){return!0})),K=P,T=function n(t){return Object.assign(g(t),{startsWith:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&n.startsWith(r)}))));var r},endsWith:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&n.endsWith(r)}))));var r},minLength:function(e){return n(O(t,function(n){return j(function(t){return E(t)&&t.length>=n})}(e)))},length:function(e){return n(O(t,function(n){return j(function(t){return E(t)&&t.length===n})}(e)))},maxLength:function(e){return n(O(t,function(n){return j(function(t){return E(t)&&t.length<=n})}(e)))},includes:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&n.includes(r)}))));var r},regex:function(e){return n(O(t,(r=e,j(function(n){return E(n)&&Boolean(n.match(r))}))));var r}})}(j(E)),B=function n(t){return Object.assign(g(t),{between:function(e,r){return n(O(t,function(n,t){return j(function(e){return A(e)&&n<=e&&t>=e})}(e,r)))},lt:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t<n})}(e)))},gt:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t>n})}(e)))},lte:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t<=n})}(e)))},gte:function(e){return n(O(t,function(n){return j(function(t){return A(t)&&t>=n})}(e)))},int:function(){return n(O(t,j(function(n){return A(n)&&Number.isInteger(n)})))},finite:function(){return n(O(t,j(function(n){return A(n)&&Number.isFinite(n)})))},positive:function(){return n(O(t,j(function(n){return A(n)&&n>0})))},negative:function(){return n(O(t,j(function(n){return A(n)&&n<0})))}})}(j(A)),M=function n(t){return Object.assign(g(t),{between:function(e,r){return n(O(t,function(n,t){return j(function(e){return _(e)&&n<=e&&t>=e})}(e,r)))},lt:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t<n})}(e)))},gt:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t>n})}(e)))},lte:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t<=n})}(e)))},gte:function(e){return n(O(t,function(n){return j(function(t){return _(t)&&t>=n})}(e)))},positive:function(){return n(O(t,j(function(n){return _(n)&&n>0})))},negative:function(){return n(O(t,j(function(n){return _(n)&&n<0})))}})}(j(_)),R=g(j(function(n){return"boolean"==typeof n})),I=g(j(function(n){return"symbol"==typeof n})),N=g(j(function(n){return null==n})),k=g(j(function(n){return null!=n})),W={__proto__:null,matcher:c,optional:m,array:function(){var n,t=[].slice.call(arguments);return d(((n={})[c]=function(){return{match:function(n){if(!Array.isArray(n))return{matched:!1};if(0===t.length)return{matched:!0};var e=t[0],r={};if(0===n.length)return v(e).forEach(function(n){r[n]=[]}),{matched:!0,selections:r};var u=function(n,t){r[n]=(r[n]||[]).concat([t])};return{matched:n.every(function(n){return h(e,n,u)}),selections:r}},getSelectionKeys:function(){return 0===t.length?[]:v(t[0])}}},n))},set:function(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){if(!(n instanceof Set))return{matched:!1};var e={};if(0===n.size)return{matched:!0,selections:e};if(0===t.length)return{matched:!0};var r=function(n,t){e[n]=(e[n]||[]).concat([t])},u=t[0];return{matched:b(n,function(n){return h(u,n,r)}),selections:e}},getSelectionKeys:function(){return 0===t.length?[]:v(t[0])}}},n))},map:function(){var n,t=[].slice.call(arguments);return g(((n={})[c]=function(){return{match:function(n){if(!(n instanceof Map))return{matched:!1};var e={};if(0===n.size)return{matched:!0,selections:e};var r,u=function(n,t){e[n]=(e[n]||[]).concat([t])};if(0===t.length)return{matched:!0};if(1===t.length)throw new Error("`P.map` wasn't given enough arguments. Expected (key, value), received "+(null==(r=t[0])?void 0:r.toString()));var i=t[0],o=t[1];return{matched:w(n,function(n,t){var e=h(i,t,u),r=h(o,n,u);return e&&r}),selections:e}},getSelectionKeys:function(){return 0===t.length?[]:[].concat(v(t[0]),v(t[1]))}}},n))},intersection:O,union:S,not:function(n){var t;return g(((t={})[c]=function(){return{match:function(t){return{matched:!h(n,t,function(){})}},getSelectionKeys:function(){return[]},matcherType:"not"}},t))},when:j,select:x,any:P,_:K,string:T,number:B,bigint:M,boolean:R,symbol:I,nullish:N,nonNullable:k,instanceOf:function(n){return g(j(function(n){return function(t){return t instanceof n}}(n)))},shape:function(n){return g(j(y(n)))}},F=/*#__PURE__*/function(n){var t,r;function u(t){var e,r;try{r=JSON.stringify(t)}catch(n){r=t}return(e=n.call(this,"Pattern matching error: no pattern matches value "+r)||this).input=void 0,e.input=t,e}return r=n,(t=u).prototype=Object.create(r.prototype),t.prototype.constructor=t,e(t,r),u}(/*#__PURE__*/u(Error)),z={matched:!1,value:void 0},L=/*#__PURE__*/function(){function n(n,t){this.input=void 0,this.state=void 0,this.input=n,this.state=t}var t=n.prototype;return t.with=function(){var t=this,e=[].slice.call(arguments);if(this.state.matched)return this;var r=e[e.length-1],u=[e[0]],i=void 0;3===e.length&&"function"==typeof e[1]?i=e[1]:e.length>2&&u.push.apply(u,e.slice(1,e.length-1));var o=!1,c={},f=function(n,t){o=!0,c[n]=t},l=!u.some(function(n){return h(n,t.input,f)})||i&&!Boolean(i(this.input))?z:{matched:!0,value:r(o?a in c?c[a]:c:this.input,this.input)};return new n(this.input,l)},t.when=function(t,e){if(this.state.matched)return this;var r=Boolean(t(this.input));return new n(this.input,r?{matched:!0,value:e(this.input,this.input)}:z)},t.otherwise=function(n){return this.state.matched?this.state.value:n(this.input)},t.exhaustive=function(){if(this.state.matched)return this.state.value;throw new F(this.input)},t.run=function(){return this.exhaustive()},t.returnType=function(){return this},n}();n.NonExhaustiveError=F,n.P=W,n.Pattern=W,n.isMatching=y,n.match=function(n){return new L(n,z)}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "ts-pattern", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"description": " The exhaustive Pattern Matching library for TypeScript.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
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
416937
1483