Socket
Socket
Sign inDemoInstall

ts-pattern

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-pattern - npm Package Compare versions

Comparing version 4.2.0-rc.0 to 4.2.0

2

dist/index.modern.js

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

const e=Symbol("@ts-pattern/matcher"),t="@ts-pattern/anonymous-select-key",n=e=>Boolean(e&&"object"==typeof e),r=t=>t&&!!t[e],o=(t,c,a)=>{if(n(t)){if(r(t)){const n=t[e](),{matched:r,selections:o}=n.match(c);return r&&o&&Object.keys(o).forEach(e=>a(e,o[e])),r}if(!n(c))return!1;if(Array.isArray(t))return!!Array.isArray(c)&&t.length===c.length&&t.every((e,t)=>o(e,c[t],a));if(t instanceof Map)return c instanceof Map&&Array.from(t.keys()).every(e=>o(t.get(e),c.get(e),a));if(t instanceof Set){if(!(c instanceof Set))return!1;if(0===t.size)return 0===c.size;if(1===t.size){const[e]=Array.from(t.values());return r(e)?Array.from(c.values()).every(t=>o(e,t,a)):c.has(e)}return Array.from(t.values()).every(e=>c.has(e))}return Object.keys(t).every(n=>{const s=t[n];return(n in c||r(i=s)&&"optional"===i[e]().matcherType)&&o(s,c[n],a);var i})}return Object.is(c,t)},c=t=>{var o,s,i;return n(t)?r(t)?null!=(o=null==(s=(i=t[e]()).getSelectionKeys)?void 0:s.call(i))?o:[]:Array.isArray(t)?a(t,c):a(Object.values(t),c):[]},a=(e,t)=>e.reduce((e,n)=>e.concat(t(n)),[]);function s(t){return{[e]:()=>({match:e=>{let n={};const r=(e,t)=>{n[e]=t};return void 0===e?(c(t).forEach(e=>r(e,void 0)),{matched:!0,selections:n}):{matched:o(t,e,r),selections:n}},getSelectionKeys:()=>c(t),matcherType:"optional"})}}function i(t){return{[e]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};let n={};if(0===e.length)return c(t).forEach(e=>{n[e]=[]}),{matched:!0,selections:n};const r=(e,t)=>{n[e]=(n[e]||[]).concat([t])};return{matched:e.every(e=>o(t,e,r)),selections:n}},getSelectionKeys:()=>c(t)})}}function u(...t){return{[e]:()=>({match:e=>{let n={};const r=(e,t)=>{n[e]=t};return{matched:t.every(t=>o(t,e,r)),selections:n}},getSelectionKeys:()=>a(t,c),matcherType:"and"})}}function l(...t){return{[e]:()=>({match:e=>{let n={};const r=(e,t)=>{n[e]=t};return a(t,c).forEach(e=>r(e,void 0)),{matched:t.some(t=>o(t,e,r)),selections:n}},getSelectionKeys:()=>a(t,c),matcherType:"or"})}}function h(t){return{[e]:()=>({match:e=>({matched:!o(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})}}function f(t){return{[e]:()=>({match:e=>({matched:Boolean(t(e))})})}}function y(...n){const r="string"==typeof n[0]?n[0]:void 0,a=2===n.length?n[1]:"string"==typeof n[0]?void 0:n[0];return{[e]:()=>({match:e=>{let n={[null!=r?r:t]:e};return{matched:void 0===a||o(a,e,(e,t)=>{n[e]=t}),selections:n}},getSelectionKeys:()=>[null!=r?r:t].concat(void 0===a?[]:c(a))})}}const m=f(function(e){return!0}),v=m,d=f(function(e){return"string"==typeof e}),g=f(function(e){return"number"==typeof e}),p=f(function(e){return"boolean"==typeof e}),b=f(function(e){return"bigint"==typeof e}),w=f(function(e){return"symbol"==typeof e}),A=f(function(e){return null==e});var S={__proto__:null,optional:s,array:i,intersection:u,union:l,not:h,when:f,select:y,any:m,_:v,string:d,number:g,boolean:p,bigint:b,symbol:w,nullish:A,instanceOf:function(e){return f(function(e){return t=>t instanceof e}(e))},typed:function(){return{array:i,optional:s,intersection:u,union:l,not:h,select:y,when:f}}};const K=e=>new O(e,[]);class O{constructor(e,t){this.value=void 0,this.cases=void 0,this.value=e,this.cases=t}with(...e){const n=e[e.length-1],r=[e[0]],c=[];return 3===e.length&&"function"==typeof e[1]?(r.push(e[0]),c.push(e[1])):e.length>2&&r.push(...e.slice(1,e.length-1)),new O(this.value,this.cases.concat([{match:e=>{let n={};const a=Boolean(r.some(t=>o(t,e,(e,t)=>{n[e]=t}))&&c.every(t=>t(e)));return{matched:a,value:a&&Object.keys(n).length?t in n?n[t]:n:e}},handler:n}]))}when(e,t){return new O(this.value,this.cases.concat([{match:t=>({matched:Boolean(e(t)),value:t}),handler:t}]))}otherwise(e){return new O(this.value,this.cases.concat([{match:e=>({matched:!0,value:e}),handler:e}])).run()}exhaustive(){return this.run()}run(){let e,t=this.value;for(let n=0;n<this.cases.length;n++){const r=this.cases[n],o=r.match(this.value);if(o.matched){t=o.value,e=r.handler;break}}if(!e){let e;try{e=JSON.stringify(this.value)}catch(t){e=this.value}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}return e(t,this.value)}}function j(...e){if(1===e.length){const[t]=e;return e=>o(t,e,()=>{})}if(2===e.length){const[t,n]=e;return o(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}export{S as P,S as Pattern,j as isMatching,K as match};
const e=Symbol("@ts-pattern/matcher"),t="@ts-pattern/anonymous-select-key",n=e=>Boolean(e&&"object"==typeof e),r=t=>t&&!!t[e],o=(t,c,a)=>{if(n(t)){if(r(t)){const n=t[e](),{matched:r,selections:o}=n.match(c);return r&&o&&Object.keys(o).forEach(e=>a(e,o[e])),r}if(!n(c))return!1;if(Array.isArray(t))return!!Array.isArray(c)&&t.length===c.length&&t.every((e,t)=>o(e,c[t],a));if(t instanceof Map)return c instanceof Map&&Array.from(t.keys()).every(e=>o(t.get(e),c.get(e),a));if(t instanceof Set){if(!(c instanceof Set))return!1;if(0===t.size)return 0===c.size;if(1===t.size){const[e]=Array.from(t.values());return r(e)?Array.from(c.values()).every(t=>o(e,t,a)):c.has(e)}return Array.from(t.values()).every(e=>c.has(e))}return Object.keys(t).every(n=>{const s=t[n];return(n in c||r(i=s)&&"optional"===i[e]().matcherType)&&o(s,c[n],a);var i})}return Object.is(c,t)},c=t=>{var o,s,i;return n(t)?r(t)?null!=(o=null==(s=(i=t[e]()).getSelectionKeys)?void 0:s.call(i))?o:[]:Array.isArray(t)?a(t,c):a(Object.values(t),c):[]},a=(e,t)=>e.reduce((e,n)=>e.concat(t(n)),[]);function s(t){return{[e]:()=>({match:e=>{let n={};const r=(e,t)=>{n[e]=t};return void 0===e?(c(t).forEach(e=>r(e,void 0)),{matched:!0,selections:n}):{matched:o(t,e,r),selections:n}},getSelectionKeys:()=>c(t),matcherType:"optional"})}}function i(t){return{[e]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};let n={};if(0===e.length)return c(t).forEach(e=>{n[e]=[]}),{matched:!0,selections:n};const r=(e,t)=>{n[e]=(n[e]||[]).concat([t])};return{matched:e.every(e=>o(t,e,r)),selections:n}},getSelectionKeys:()=>c(t)})}}function u(...t){return{[e]:()=>({match:e=>{let n={};const r=(e,t)=>{n[e]=t};return{matched:t.every(t=>o(t,e,r)),selections:n}},getSelectionKeys:()=>a(t,c),matcherType:"and"})}}function l(...t){return{[e]:()=>({match:e=>{let n={};const r=(e,t)=>{n[e]=t};return a(t,c).forEach(e=>r(e,void 0)),{matched:t.some(t=>o(t,e,r)),selections:n}},getSelectionKeys:()=>a(t,c),matcherType:"or"})}}function h(t){return{[e]:()=>({match:e=>({matched:!o(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})}}function f(t){return{[e]:()=>({match:e=>({matched:Boolean(t(e))})})}}function y(...n){const r="string"==typeof n[0]?n[0]:void 0,a=2===n.length?n[1]:"string"==typeof n[0]?void 0:n[0];return{[e]:()=>({match:e=>{let n={[null!=r?r:t]:e};return{matched:void 0===a||o(a,e,(e,t)=>{n[e]=t}),selections:n}},getSelectionKeys:()=>[null!=r?r:t].concat(void 0===a?[]:c(a))})}}const m=f(function(e){return!0}),v=m,d=f(function(e){return"string"==typeof e}),g=f(function(e){return"number"==typeof e}),p=f(function(e){return"boolean"==typeof e}),b=f(function(e){return"bigint"==typeof e}),w=f(function(e){return"symbol"==typeof e}),A=f(function(e){return null==e});var S={__proto__:null,optional:s,array:i,intersection:u,union:l,not:h,when:f,select:y,any:m,_:v,string:d,number:g,boolean:p,bigint:b,symbol:w,nullish:A,instanceOf:function(e){return f(function(e){return t=>t instanceof e}(e))},typed:function(){return{array:i,optional:s,intersection:u,union:l,not:h,select:y,when:f}}};function K(e){return new O(e,[])}class O{constructor(e,t){this.value=void 0,this.cases=void 0,this.value=e,this.cases=t}with(...e){const n=e[e.length-1],r=[e[0]],c=[];return 3===e.length&&"function"==typeof e[1]?(r.push(e[0]),c.push(e[1])):e.length>2&&r.push(...e.slice(1,e.length-1)),new O(this.value,this.cases.concat([{match:e=>{let n={};const a=Boolean(r.some(t=>o(t,e,(e,t)=>{n[e]=t}))&&c.every(t=>t(e)));return{matched:a,value:a&&Object.keys(n).length?t in n?n[t]:n:e}},handler:n}]))}when(e,t){return new O(this.value,this.cases.concat([{match:t=>({matched:Boolean(e(t)),value:t}),handler:t}]))}otherwise(e){return new O(this.value,this.cases.concat([{match:e=>({matched:!0,value:e}),handler:e}])).run()}exhaustive(){return this.run()}run(){let e,t=this.value;for(let n=0;n<this.cases.length;n++){const r=this.cases[n],o=r.match(this.value);if(o.matched){t=o.value,e=r.handler;break}}if(!e){let e;try{e=JSON.stringify(this.value)}catch(t){e=this.value}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}return e(t,this.value)}}function j(...e){if(1===e.length){const[t]=e;return e=>o(t,e,()=>{})}if(2===e.length){const[t,n]=e;return o(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}export{S as P,S as Pattern,j as isMatching,K as match};
//# sourceMappingURL=index.modern.js.map

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

var n=Symbol("@ts-pattern/matcher"),t="@ts-pattern/anonymous-select-key",e=function(n){return Boolean(n&&"object"==typeof n)},r=function(t){return t&&!!t[n]},u=function t(u,i,c){if(e(u)){if(r(u)){var o=u[n]().match(i),a=o.matched,f=o.selections;return a&&f&&Object.keys(f).forEach(function(n){return c(n,f[n])}),a}if(!e(i))return!1;if(Array.isArray(u))return!!Array.isArray(i)&&u.length===i.length&&u.every(function(n,e){return t(n,i[e],c)});if(u instanceof Map)return i instanceof Map&&Array.from(u.keys()).every(function(n){return t(u.get(n),i.get(n),c)});if(u instanceof Set){if(!(i instanceof Set))return!1;if(0===u.size)return 0===i.size;if(1===u.size){var s=Array.from(u.values())[0];return r(s)?Array.from(i.values()).every(function(n){return t(s,n,c)}):i.has(s)}return Array.from(u.values()).every(function(n){return i.has(n)})}return Object.keys(u).every(function(e){var o,a=u[e];return(e in i||r(o=a)&&"optional"===o[n]().matcherType)&&t(a,i[e],c)})}return Object.is(i,u)},i=function t(u){var i,o,a;return e(u)?r(u)?null!=(i=null==(o=(a=u[n]()).getSelectionKeys)?void 0:o.call(a))?i:[]:Array.isArray(u)?c(u,t):c(Object.values(u),t):[]},c=function(n,t){return n.reduce(function(n,e){return n.concat(t(e))},[])};function o(t){var e;return(e={})[n]=function(){return{match:function(n){var e={},r=function(n,t){e[n]=t};return void 0===n?(i(t).forEach(function(n){return r(n,void 0)}),{matched:!0,selections:e}):{matched:u(t,n,r),selections:e}},getSelectionKeys:function(){return i(t)},matcherType:"optional"}},e}function a(t){var e;return(e={})[n]=function(){return{match:function(n){if(!Array.isArray(n))return{matched:!1};var e={};if(0===n.length)return i(t).forEach(function(n){e[n]=[]}),{matched:!0,selections:e};var r=function(n,t){e[n]=(e[n]||[]).concat([t])};return{matched:n.every(function(n){return u(t,n,r)}),selections:e}},getSelectionKeys:function(){return i(t)}}},e}function f(){var t,e=[].slice.call(arguments);return(t={})[n]=function(){return{match:function(n){var t={},r=function(n,e){t[n]=e};return{matched:e.every(function(t){return u(t,n,r)}),selections:t}},getSelectionKeys:function(){return c(e,i)},matcherType:"and"}},t}function s(){var t,e=[].slice.call(arguments);return(t={})[n]=function(){return{match:function(n){var t={},r=function(n,e){t[n]=e};return c(e,i).forEach(function(n){return r(n,void 0)}),{matched:e.some(function(t){return u(t,n,r)}),selections:t}},getSelectionKeys:function(){return c(e,i)},matcherType:"or"}},t}function l(t){var e;return(e={})[n]=function(){return{match:function(n){return{matched:!u(t,n,function(){})}},getSelectionKeys:function(){return[]},matcherType:"not"}},e}function h(t){var e;return(e={})[n]=function(){return{match:function(n){return{matched:Boolean(t(n))}}}},e}function v(){var e,r=[].slice.call(arguments),c="string"==typeof r[0]?r[0]:void 0,o=2===r.length?r[1]:"string"==typeof r[0]?void 0:r[0];return(e={})[n]=function(){return{match:function(n){var e,r=((e={})[null!=c?c:t]=n,e);return{matched:void 0===o||u(o,n,function(n,t){r[n]=t}),selections:r}},getSelectionKeys:function(){return[null!=c?c:t].concat(void 0===o?[]:i(o))}}},e}var y=h(function(n){return!0}),m=y,d=h(function(n){return"string"==typeof n}),g=h(function(n){return"number"==typeof n}),p=h(function(n){return"boolean"==typeof n}),b=h(function(n){return"bigint"==typeof n}),w=h(function(n){return"symbol"==typeof n}),A=h(function(n){return null==n}),S={__proto__:null,optional:o,array:a,intersection:f,union:s,not:l,when:h,select:v,any:y,_:m,string:d,number:g,boolean:p,bigint:b,symbol:w,nullish:A,instanceOf:function(n){return h(function(n){return function(t){return t instanceof n}}(n))},typed:function(){return{array:a,optional:o,intersection:f,union:s,not:l,select:v,when:h}}},K=function(n){return new O(n,[])},O=/*#__PURE__*/function(){function n(n,t){this.value=void 0,this.cases=void 0,this.value=n,this.cases=t}var e=n.prototype;return e.with=function(){var e=[].slice.call(arguments),r=e[e.length-1],i=[e[0]],c=[];return 3===e.length&&"function"==typeof e[1]?(i.push(e[0]),c.push(e[1])):e.length>2&&i.push.apply(i,e.slice(1,e.length-1)),new n(this.value,this.cases.concat([{match:function(n){var e={},r=Boolean(i.some(function(t){return u(t,n,function(n,t){e[n]=t})})&&c.every(function(t){return t(n)}));return{matched:r,value:r&&Object.keys(e).length?t in e?e[t]:e:n}},handler:r}]))},e.when=function(t,e){return new n(this.value,this.cases.concat([{match:function(n){return{matched:Boolean(t(n)),value:n}},handler:e}]))},e.otherwise=function(t){return new n(this.value,this.cases.concat([{match:function(n){return{matched:!0,value:n}},handler:t}])).run()},e.exhaustive=function(){return this.run()},e.run=function(){for(var n=this.value,t=void 0,e=0;e<this.cases.length;e++){var r=this.cases[e],u=r.match(this.value);if(u.matched){n=u.value,t=r.handler;break}}if(!t){var i;try{i=JSON.stringify(this.value)}catch(n){i=this.value}throw new Error("Pattern matching error: no pattern matches value "+i)}return t(n,this.value)},n}();function j(){var n=[].slice.call(arguments);if(1===n.length){var t=n[0];return function(n){return u(t,n,function(){})}}if(2===n.length){var e=n,r=e[0],i=e[1];return u(r,i,function(){})}throw new Error("isMatching wasn't given the right number of arguments: expected 1 or 2, received "+n.length+".")}export{S as P,S as Pattern,j as isMatching,K as match};
var n=Symbol("@ts-pattern/matcher"),t="@ts-pattern/anonymous-select-key",e=function(n){return Boolean(n&&"object"==typeof n)},r=function(t){return t&&!!t[n]},u=function t(u,i,c){if(e(u)){if(r(u)){var o=u[n]().match(i),a=o.matched,f=o.selections;return a&&f&&Object.keys(f).forEach(function(n){return c(n,f[n])}),a}if(!e(i))return!1;if(Array.isArray(u))return!!Array.isArray(i)&&u.length===i.length&&u.every(function(n,e){return t(n,i[e],c)});if(u instanceof Map)return i instanceof Map&&Array.from(u.keys()).every(function(n){return t(u.get(n),i.get(n),c)});if(u instanceof Set){if(!(i instanceof Set))return!1;if(0===u.size)return 0===i.size;if(1===u.size){var s=Array.from(u.values())[0];return r(s)?Array.from(i.values()).every(function(n){return t(s,n,c)}):i.has(s)}return Array.from(u.values()).every(function(n){return i.has(n)})}return Object.keys(u).every(function(e){var o,a=u[e];return(e in i||r(o=a)&&"optional"===o[n]().matcherType)&&t(a,i[e],c)})}return Object.is(i,u)},i=function t(u){var i,o,a;return e(u)?r(u)?null!=(i=null==(o=(a=u[n]()).getSelectionKeys)?void 0:o.call(a))?i:[]:Array.isArray(u)?c(u,t):c(Object.values(u),t):[]},c=function(n,t){return n.reduce(function(n,e){return n.concat(t(e))},[])};function o(t){var e;return(e={})[n]=function(){return{match:function(n){var e={},r=function(n,t){e[n]=t};return void 0===n?(i(t).forEach(function(n){return r(n,void 0)}),{matched:!0,selections:e}):{matched:u(t,n,r),selections:e}},getSelectionKeys:function(){return i(t)},matcherType:"optional"}},e}function a(t){var e;return(e={})[n]=function(){return{match:function(n){if(!Array.isArray(n))return{matched:!1};var e={};if(0===n.length)return i(t).forEach(function(n){e[n]=[]}),{matched:!0,selections:e};var r=function(n,t){e[n]=(e[n]||[]).concat([t])};return{matched:n.every(function(n){return u(t,n,r)}),selections:e}},getSelectionKeys:function(){return i(t)}}},e}function f(){var t,e=[].slice.call(arguments);return(t={})[n]=function(){return{match:function(n){var t={},r=function(n,e){t[n]=e};return{matched:e.every(function(t){return u(t,n,r)}),selections:t}},getSelectionKeys:function(){return c(e,i)},matcherType:"and"}},t}function s(){var t,e=[].slice.call(arguments);return(t={})[n]=function(){return{match:function(n){var t={},r=function(n,e){t[n]=e};return c(e,i).forEach(function(n){return r(n,void 0)}),{matched:e.some(function(t){return u(t,n,r)}),selections:t}},getSelectionKeys:function(){return c(e,i)},matcherType:"or"}},t}function l(t){var e;return(e={})[n]=function(){return{match:function(n){return{matched:!u(t,n,function(){})}},getSelectionKeys:function(){return[]},matcherType:"not"}},e}function h(t){var e;return(e={})[n]=function(){return{match:function(n){return{matched:Boolean(t(n))}}}},e}function v(){var e,r=[].slice.call(arguments),c="string"==typeof r[0]?r[0]:void 0,o=2===r.length?r[1]:"string"==typeof r[0]?void 0:r[0];return(e={})[n]=function(){return{match:function(n){var e,r=((e={})[null!=c?c:t]=n,e);return{matched:void 0===o||u(o,n,function(n,t){r[n]=t}),selections:r}},getSelectionKeys:function(){return[null!=c?c:t].concat(void 0===o?[]:i(o))}}},e}var y=h(function(n){return!0}),m=y,d=h(function(n){return"string"==typeof n}),g=h(function(n){return"number"==typeof n}),p=h(function(n){return"boolean"==typeof n}),b=h(function(n){return"bigint"==typeof n}),w=h(function(n){return"symbol"==typeof n}),A=h(function(n){return null==n}),S={__proto__:null,optional:o,array:a,intersection:f,union:s,not:l,when:h,select:v,any:y,_:m,string:d,number:g,boolean:p,bigint:b,symbol:w,nullish:A,instanceOf:function(n){return h(function(n){return function(t){return t instanceof n}}(n))},typed:function(){return{array:a,optional:o,intersection:f,union:s,not:l,select:v,when:h}}};function K(n){return new O(n,[])}var O=/*#__PURE__*/function(){function n(n,t){this.value=void 0,this.cases=void 0,this.value=n,this.cases=t}var e=n.prototype;return e.with=function(){var e=[].slice.call(arguments),r=e[e.length-1],i=[e[0]],c=[];return 3===e.length&&"function"==typeof e[1]?(i.push(e[0]),c.push(e[1])):e.length>2&&i.push.apply(i,e.slice(1,e.length-1)),new n(this.value,this.cases.concat([{match:function(n){var e={},r=Boolean(i.some(function(t){return u(t,n,function(n,t){e[n]=t})})&&c.every(function(t){return t(n)}));return{matched:r,value:r&&Object.keys(e).length?t in e?e[t]:e:n}},handler:r}]))},e.when=function(t,e){return new n(this.value,this.cases.concat([{match:function(n){return{matched:Boolean(t(n)),value:n}},handler:e}]))},e.otherwise=function(t){return new n(this.value,this.cases.concat([{match:function(n){return{matched:!0,value:n}},handler:t}])).run()},e.exhaustive=function(){return this.run()},e.run=function(){for(var n=this.value,t=void 0,e=0;e<this.cases.length;e++){var r=this.cases[e],u=r.match(this.value);if(u.matched){n=u.value,t=r.handler;break}}if(!t){var i;try{i=JSON.stringify(this.value)}catch(n){i=this.value}throw new Error("Pattern matching error: no pattern matches value "+i)}return t(n,this.value)},n}();function j(){var n=[].slice.call(arguments);if(1===n.length){var t=n[0];return function(n){return u(t,n,function(){})}}if(2===n.length){var e=n,r=e[0],i=e[1];return u(r,i,function(){})}throw new Error("isMatching wasn't given the right number of arguments: expected 1 or 2, received "+n.length+".")}export{S as P,S as Pattern,j as isMatching,K as match};
//# sourceMappingURL=index.module.js.map

@@ -21,2 +21,3 @@ import { Match } from './types/Match';

*/
export declare const match: <input, output = typeof symbols.unset>(value: input) => Match<input, output>;
export declare function match<input extends [any, ...any], output = symbols.unset>(value: input): Match<input, output>;
export declare function match<input, output = symbols.unset>(value: input): Match<input, output>;
{
"name": "ts-pattern",
"version": "4.2.0-rc.0",
"version": "4.2.0",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc