functype 0.8.25 → 0.8.26
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/dist/chunk-HGAOWVBI.js +1 -0
- package/dist/chunk-NJJ3CNH5.mjs +1 -0
- package/dist/collections/index.d.mts +1 -1
- package/dist/collections/index.d.ts +1 -1
- package/dist/either/Either.d.mts +1 -1
- package/dist/either/Either.d.ts +1 -1
- package/dist/either/Either.js +1 -1
- package/dist/either/Either.mjs +1 -1
- package/dist/either/EitherT.d.mts +1 -1
- package/dist/either/EitherT.d.ts +1 -1
- package/dist/either/EitherT.js +1 -1
- package/dist/either/EitherT.mjs +1 -1
- package/dist/{index-X7DURAk8.d.mts → index-BWBqO3Kp.d.mts} +8 -4
- package/dist/{index-C41wVEwK.d.ts → index-DQD4k2t3.d.ts} +8 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/iterable/Seq.d.mts +2 -2
- package/dist/iterable/Seq.d.ts +2 -2
- package/dist/iterable/Seq.js +1 -1
- package/dist/iterable/Seq.mjs +1 -1
- package/dist/iterable/index.d.mts +1 -1
- package/dist/iterable/index.d.ts +1 -1
- package/dist/iterable/index.js +1 -1
- package/dist/iterable/index.mjs +1 -1
- package/dist/list/List.d.mts +1 -1
- package/dist/list/List.d.ts +1 -1
- package/dist/list/List.js +1 -1
- package/dist/list/List.mjs +1 -1
- package/dist/map/Map.d.mts +1 -1
- package/dist/map/Map.d.ts +1 -1
- package/dist/map/Map.js +1 -1
- package/dist/map/Map.mjs +1 -1
- package/dist/option/Option.d.mts +1 -1
- package/dist/option/Option.d.ts +1 -1
- package/dist/option/Option.js +1 -1
- package/dist/option/Option.mjs +1 -1
- package/dist/set/Set.d.mts +1 -1
- package/dist/set/Set.d.ts +1 -1
- package/dist/set/Set.js +1 -1
- package/dist/set/Set.mjs +1 -1
- package/dist/try/Try.d.mts +1 -1
- package/dist/try/Try.d.ts +1 -1
- package/dist/try/Try.js +1 -1
- package/dist/try/Try.mjs +1 -1
- package/dist/typeable/Typeable.d.mts +3 -3
- package/dist/typeable/Typeable.d.ts +3 -3
- package/dist/util/index.d.mts +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/index.mjs +1 -1
- package/lib/iterable/Seq.d.ts +6 -1
- package/lib/list/List.d.ts +3 -3
- package/lib/typeable/Typeable.d.ts +3 -3
- package/package.json +1 -1
- package/dist/chunk-H4VE5SDW.mjs +0 -1
- package/dist/chunk-XKERTVFW.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _safestablestringify = require('safe-stable-stringify'); var _safestablestringify2 = _interopRequireDefault(_safestablestringify);var y=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t),i="Seq";return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},_tag:i,map:o=>y(r.map(o)),flatMap:o=>y(r.flatMap(n=>o(n).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>y(r.filter(o)),filterNot:o=>y(r.filter(n=>!o(n))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):L()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>n=>r.reduce(n,o),foldRight:o=>n=>r.reduceRight((u,x)=>n(x,u),o),toString:()=>`Seq(${_safestablestringify2.default.call(void 0, e)})`,toValue:()=>({_tag:i,value:r})}},T= exports.e =e=>y(e);var g=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?new (0, _chunk3VJERXBPjs.a)(e):new (0, _chunk3VJERXBPjs.a)(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.toArray, 'call', _3 => _3()]), () => ([]))),r=T(t),i={...r,add:o=>g([...t,o]),remove:o=>{let n=new (0, _chunk3VJERXBPjs.a)(t);return n.delete(o),g(n)},contains:o=>t.has(o),has:o=>t.has(o),map:o=>g(r.map(o)),flatMap:o=>g(r.flatMap(o)),toList:()=>p(t),toSet:()=>i,toString:()=>`Set(${Array.from(t).toString()})`};return i},R= exports.f =e=>g(e);var m=e=>{function t(n){return n!=null&&typeof n[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],i=T(r),o={...i,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(i.flatMap(n)),remove:n=>{let u=r.indexOf(n);return o.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?o:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>o,toSet:()=>R(r),toValue:()=>({_tag:"List",value:r}),toString:()=>`List(${_safestablestringify2.default.call(void 0, p(r))})`};return new Proxy(o,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},p= exports.g =e=>m(e),H= exports.h =e=>m(e);console.assert(H);var O=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>d(e),toList:()=>p([e]),toString:()=>`Right(${_safestablestringify2.default.call(void 0, e)})`}),K=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>L(),toList:()=>p(),toString:()=>`Left(${_safestablestringify2.default.call(void 0, e)})`}),f= exports.i =e=>O(e),s= exports.j =e=>K(e),B= exports.k =e=>e.isRight(),I= exports.l =e=>e.isLeft(),Be= exports.m =(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},J= exports.n =e=>O(e);console.assert(J);var Q=e=>K(e);console.assert(Q);var xe=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return s(t(r))}};function S(e){return{value:e,map(t){let r=e.then(i=>{if(B(i))try{let o=t(i.value);return f(o)}catch(o){return s(o)}else return s(i.value)});return S(r)},flatMap(t){let r=e.then(i=>{if(B(i))try{return t(i.value).value}catch(o){return Promise.resolve(s(o))}else return Promise.resolve(s(i.value))});return S(r)},mapLeft(t){let r=e.then(i=>{if(I(i))try{let o=t(i.value);return s(o)}catch(o){return s(o)}else return f(i.value)});return S(r)},fold(t,r){return e.then(i=>B(i)?r(i.value):t(i.value))}}}var c=e=>{let t={values:new (0, _chunk5VTXJIR3js.a)(e)},r=()=>Array.from(t.values.entries()).map(([a,l])=>_chunkOXLZ6UIZjs.a.call(void 0, [a,l])),i=a=>c(new (0, _chunk5VTXJIR3js.a)(t.values).set(a.toArray()[0],a.toArray()[1]).entries()),o=a=>{let l=new (0, _chunk5VTXJIR3js.a)(t.values);return l.delete(a)?c(l.entries()):c(t.values.entries())},n=a=>t.values.get(a[0])===a[1],u=()=>t.values.size,x=a=>c(Array.from(t.values.entries()).map(([l,j])=>[l,a(j)])),P=a=>{let l=c(t.values.entries()).toList();return c(l.flatMap(a).toArray())},q=a=>T(r()).reduce(a),z=a=>T(r()).reduceRight(a),N=a=>l=>T(r()).foldLeft(a)(l),k=a=>l=>T(r()).foldRight(a)(l),F=a=>A(t.values.get(a)),C=(a,l)=>A(t.values.get(a)).getOrElse(l),$=()=>t.values.size===0;return{add:i,remove:o,contains:n,get size(){return u()},map:x,flatMap:P,reduce:q,reduceRight:z,foldLeft:N,foldRight:k,get:F,getOrElse:C,get isEmpty(){return $()},orElse:(a,l)=>A(t.values.get(a)).orElse(l),toList:()=>p(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne= exports.r =e=>c(e);var w=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>w(e),orThrow:t=>e,toEither:()=>f(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${_safestablestringify2.default.call(void 0, e)})`}),_=e=>({_tag:"Failure",value:void 0,error:e,isSuccess:()=>!1,isFailure:()=>!0,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>s(e),map:t=>_(e),flatMap:t=>_(e),toString:()=>`Failure(${_safestablestringify2.default.call(void 0, e)}))`}),W= exports.s =e=>{try{return w(e())}catch(t){return _(t instanceof Error?t:new Error(String(t)))}};var d=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>d(e),map:t=>d(t(e)),filter(t){return t(e)?d(e):h},flatMap:t=>t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>p([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${_safestablestringify2.default.call(void 0, e)})`,toValue:()=>({_tag:"Some",value:e})}),h={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>h,filter(e){return h},flatMap:e=>h,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},L= exports.b =()=>h,A= exports.c =e=>e!=null?d(e):L();exports.a = d; exports.b = L; exports.c = A; exports.d = y; exports.e = T; exports.f = R; exports.g = p; exports.h = H; exports.i = f; exports.j = s; exports.k = B; exports.l = I; exports.m = Be; exports.n = J; exports.o = Q; exports.p = xe; exports.q = S; exports.r = Ne; exports.s = W;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as U}from"./chunk-HA5XD5KC.mjs";import{a as v}from"./chunk-2I2NKDFN.mjs";import{a as b}from"./chunk-RRAIFS3D.mjs";import{a as E}from"./chunk-377WQNCB.mjs";import G from"safe-stable-stringify";import D from"safe-stable-stringify";var y=e=>{let t=b(e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t),i="Seq";return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},_tag:i,map:o=>y(r.map(o)),flatMap:o=>y(r.flatMap(n=>o(n).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>y(r.filter(o)),filterNot:o=>y(r.filter(n=>!o(n))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):L()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>n=>r.reduce(n,o),foldRight:o=>n=>r.reduceRight((u,x)=>n(x,u),o),toString:()=>`Seq(${D(e)})`,toValue:()=>({_tag:i,value:r})}},T=e=>y(e);var g=e=>{let t=b(e)?new U(e):new U(e?.toArray()??[]),r=T(t),i={...r,add:o=>g([...t,o]),remove:o=>{let n=new U(t);return n.delete(o),g(n)},contains:o=>t.has(o),has:o=>t.has(o),map:o=>g(r.map(o)),flatMap:o=>g(r.flatMap(o)),toList:()=>p(t),toSet:()=>i,toString:()=>`Set(${Array.from(t).toString()})`};return i},R=e=>g(e);var m=e=>{function t(n){return n!=null&&typeof n[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],i=T(r),o={...i,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(i.flatMap(n)),remove:n=>{let u=r.indexOf(n);return o.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?o:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>o,toSet:()=>R(r),toValue:()=>({_tag:"List",value:r}),toString:()=>`List(${G(p(r))})`};return new Proxy(o,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},p=e=>m(e),H=e=>m(e);console.assert(H);import V from"safe-stable-stringify";var O=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>d(e),toList:()=>p([e]),toString:()=>`Right(${V(e)})`}),K=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>L(),toList:()=>p(),toString:()=>`Left(${V(e)})`}),f=e=>O(e),s=e=>K(e),B=e=>e.isRight(),I=e=>e.isLeft(),Be=(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},J=e=>O(e);console.assert(J);var Q=e=>K(e);console.assert(Q);var xe=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return s(t(r))}};function S(e){return{value:e,map(t){let r=e.then(i=>{if(B(i))try{let o=t(i.value);return f(o)}catch(o){return s(o)}else return s(i.value)});return S(r)},flatMap(t){let r=e.then(i=>{if(B(i))try{return t(i.value).value}catch(o){return Promise.resolve(s(o))}else return Promise.resolve(s(i.value))});return S(r)},mapLeft(t){let r=e.then(i=>{if(I(i))try{let o=t(i.value);return s(o)}catch(o){return s(o)}else return f(i.value)});return S(r)},fold(t,r){return e.then(i=>B(i)?r(i.value):t(i.value))}}}var c=e=>{let t={values:new E(e)},r=()=>Array.from(t.values.entries()).map(([a,l])=>v([a,l])),i=a=>c(new E(t.values).set(a.toArray()[0],a.toArray()[1]).entries()),o=a=>{let l=new E(t.values);return l.delete(a)?c(l.entries()):c(t.values.entries())},n=a=>t.values.get(a[0])===a[1],u=()=>t.values.size,x=a=>c(Array.from(t.values.entries()).map(([l,j])=>[l,a(j)])),P=a=>{let l=c(t.values.entries()).toList();return c(l.flatMap(a).toArray())},q=a=>T(r()).reduce(a),z=a=>T(r()).reduceRight(a),N=a=>l=>T(r()).foldLeft(a)(l),k=a=>l=>T(r()).foldRight(a)(l),F=a=>A(t.values.get(a)),C=(a,l)=>A(t.values.get(a)).getOrElse(l),$=()=>t.values.size===0;return{add:i,remove:o,contains:n,get size(){return u()},map:x,flatMap:P,reduce:q,reduceRight:z,foldLeft:N,foldRight:k,get:F,getOrElse:C,get isEmpty(){return $()},orElse:(a,l)=>A(t.values.get(a)).orElse(l),toList:()=>p(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne=e=>c(e);import M from"safe-stable-stringify";var w=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>w(e),orThrow:t=>e,toEither:()=>f(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${M(e)})`}),_=e=>({_tag:"Failure",value:void 0,error:e,isSuccess:()=>!1,isFailure:()=>!0,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>s(e),map:t=>_(e),flatMap:t=>_(e),toString:()=>`Failure(${M(e)}))`}),W=e=>{try{return w(e())}catch(t){return _(t instanceof Error?t:new Error(String(t)))}};import X from"safe-stable-stringify";var d=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>d(e),map:t=>d(t(e)),filter(t){return t(e)?d(e):h},flatMap:t=>t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>p([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${X(e)})`,toValue:()=>({_tag:"Some",value:e})}),h={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>h,filter(e){return h},flatMap:e=>h,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},L=()=>h,A=e=>e!=null?d(e):L();export{d as a,L as b,A as c,y as d,T as e,R as f,p as g,H as h,f as i,s as j,B as k,I as l,Be as m,J as n,Q as o,xe as p,S as q,Ne as r,W as s};
|
package/dist/either/Either.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../functor/index.mjs';
|
|
2
|
-
export { E as Either, f as Left, R as Right, e as TestEither, j as TypeCheckLeft, h as TypeCheckRight, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from '../index-
|
|
2
|
+
export { E as Either, f as Left, R as Right, e as TestEither, j as TypeCheckLeft, h as TypeCheckRight, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from '../index-BWBqO3Kp.mjs';
|
|
3
3
|
import '../typeable/Typeable.mjs';
|
|
4
4
|
import '../identity/Identity.mjs';
|
|
5
5
|
import '../tuple/Tuple.mjs';
|
package/dist/either/Either.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../functor/index.js';
|
|
2
|
-
export { E as Either, f as Left, R as Right, e as TestEither, j as TypeCheckLeft, h as TypeCheckRight, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from '../index-
|
|
2
|
+
export { E as Either, f as Left, R as Right, e as TestEither, j as TypeCheckLeft, h as TypeCheckRight, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from '../index-DQD4k2t3.js';
|
|
3
3
|
import '../typeable/Typeable.js';
|
|
4
4
|
import '../identity/Identity.js';
|
|
5
5
|
import '../tuple/Tuple.js';
|
package/dist/either/Either.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Left = _chunkHGAOWVBIjs.j; exports.Right = _chunkHGAOWVBIjs.i; exports.TypeCheckLeft = _chunkHGAOWVBIjs.o; exports.TypeCheckRight = _chunkHGAOWVBIjs.n; exports.isLeft = _chunkHGAOWVBIjs.l; exports.isRight = _chunkHGAOWVBIjs.k; exports.tryCatch = _chunkHGAOWVBIjs.m; exports.tryCatchAsync = _chunkHGAOWVBIjs.p;
|
package/dist/either/Either.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as a,j as b,k as c,l as d,m as e,n as f,o as g,p as h}from"../chunk-
|
|
1
|
+
import{i as a,j as b,k as c,l as d,m as e,n as f,o as g,p as h}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as Left,a as Right,g as TypeCheckLeft,f as TypeCheckRight,d as isLeft,c as isRight,e as tryCatch,h as tryCatchAsync};
|
package/dist/either/EitherT.d.ts
CHANGED
package/dist/either/EitherT.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.EitherT = _chunkHGAOWVBIjs.q;
|
package/dist/either/EitherT.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as a}from"../chunk-
|
|
1
|
+
import{q as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as EitherT};
|
|
@@ -53,7 +53,11 @@ type Seq<A> = {
|
|
|
53
53
|
foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
|
|
54
54
|
foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
|
|
55
55
|
toString: () => string;
|
|
56
|
-
|
|
56
|
+
toValue: () => {
|
|
57
|
+
_tag: string;
|
|
58
|
+
value: A[];
|
|
59
|
+
};
|
|
60
|
+
} & _Iterable_<A> & Typeable<"Seq">;
|
|
57
61
|
declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
|
|
58
62
|
|
|
59
63
|
type _Iterable_<A extends Type> = {
|
|
@@ -110,10 +114,10 @@ type List<A> = {
|
|
|
110
114
|
toSet: () => Set<A>;
|
|
111
115
|
toString: () => string;
|
|
112
116
|
toValue: () => {
|
|
113
|
-
_tag:
|
|
114
|
-
value:
|
|
117
|
+
_tag: string;
|
|
118
|
+
value: A[];
|
|
115
119
|
};
|
|
116
|
-
} &
|
|
120
|
+
} & Seq<A> & Typeable<"List">;
|
|
117
121
|
declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
|
|
118
122
|
declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
|
|
119
123
|
|
|
@@ -53,7 +53,11 @@ type Seq<A> = {
|
|
|
53
53
|
foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
|
|
54
54
|
foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
|
|
55
55
|
toString: () => string;
|
|
56
|
-
|
|
56
|
+
toValue: () => {
|
|
57
|
+
_tag: string;
|
|
58
|
+
value: A[];
|
|
59
|
+
};
|
|
60
|
+
} & _Iterable_<A> & Typeable<"Seq">;
|
|
57
61
|
declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
|
|
58
62
|
|
|
59
63
|
type _Iterable_<A extends Type> = {
|
|
@@ -110,10 +114,10 @@ type List<A> = {
|
|
|
110
114
|
toSet: () => Set<A>;
|
|
111
115
|
toString: () => string;
|
|
112
116
|
toValue: () => {
|
|
113
|
-
_tag:
|
|
114
|
-
value:
|
|
117
|
+
_tag: string;
|
|
118
|
+
value: A[];
|
|
115
119
|
};
|
|
116
|
-
} &
|
|
120
|
+
} & Seq<A> & Typeable<"List">;
|
|
117
121
|
declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
|
|
118
122
|
declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
|
|
119
123
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AbstractFunctor, ArrayFunctor, ArrayType, Functor, SingleType, Type } from './functor/index.mjs';
|
|
2
|
-
export { E as Either, l as EitherT, f as Left, L as List, M as Map, N as None, O as Option, R as Right, a as Seq, b as Set, S as Some, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-
|
|
2
|
+
export { E as Either, l as EitherT, f as Left, L as List, M as Map, N as None, O as Option, R as Right, a as Seq, b as Set, S as Some, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-BWBqO3Kp.mjs';
|
|
3
3
|
export { Identity } from './identity/Identity.mjs';
|
|
4
4
|
export { Tuple } from './tuple/Tuple.mjs';
|
|
5
5
|
export { Typeable } from './typeable/Typeable.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AbstractFunctor, ArrayFunctor, ArrayType, Functor, SingleType, Type } from './functor/index.js';
|
|
2
|
-
export { E as Either, l as EitherT, f as Left, L as List, M as Map, N as None, O as Option, R as Right, a as Seq, b as Set, S as Some, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-
|
|
2
|
+
export { E as Either, l as EitherT, f as Left, L as List, M as Map, N as None, O as Option, R as Right, a as Seq, b as Set, S as Some, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-DQD4k2t3.js';
|
|
3
3
|
export { Identity } from './identity/Identity.js';
|
|
4
4
|
export { Tuple } from './tuple/Tuple.js';
|
|
5
5
|
export { Typeable } from './typeable/Typeable.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('./chunk-HGAOWVBI.js');require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');require('./chunk-BNNK42JC.js');require('./chunk-5VTXJIR3.js');require('./chunk-XORABVON.js');require('./chunk-K3EKBPQE.js');exports.EitherT = _chunkHGAOWVBIjs.q; exports.Left = _chunkHGAOWVBIjs.j; exports.List = _chunkHGAOWVBIjs.g; exports.Map = _chunkHGAOWVBIjs.r; exports.None = _chunkHGAOWVBIjs.b; exports.Option = _chunkHGAOWVBIjs.c; exports.Right = _chunkHGAOWVBIjs.i; exports.Seq = _chunkHGAOWVBIjs.e; exports.Set = _chunkHGAOWVBIjs.f; exports.Some = _chunkHGAOWVBIjs.a; exports.TestList = _chunkHGAOWVBIjs.h; exports.Try = _chunkHGAOWVBIjs.s; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.TypeCheckLeft = _chunkHGAOWVBIjs.o; exports.TypeCheckRight = _chunkHGAOWVBIjs.n; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunkHGAOWVBIjs.l; exports.isRight = _chunkHGAOWVBIjs.k; exports.tryCatch = _chunkHGAOWVBIjs.m; exports.tryCatchAsync = _chunkHGAOWVBIjs.p;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r,s}from"./chunk-
|
|
1
|
+
import{a,b,c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r,s}from"./chunk-NJJ3CNH5.mjs";import"./chunk-HA5XD5KC.mjs";import{a as q}from"./chunk-2I2NKDFN.mjs";import{a as t}from"./chunk-V7DKESTM.mjs";import"./chunk-RRAIFS3D.mjs";import"./chunk-377WQNCB.mjs";import"./chunk-V2J3R5IU.mjs";import"./chunk-2ML63TYF.mjs";export{p as EitherT,i as Left,f as List,r as Map,b as None,c as Option,h as Right,d as Seq,e as Set,a as Some,g as TestList,s as Try,q as Tuple,n as TypeCheckLeft,m as TypeCheckRight,t as Typeable,k as isLeft,j as isRight,l as tryCatch,o as tryCatchAsync};
|
package/dist/iterable/Seq.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as Seq, c as createSeq } from '../index-
|
|
1
|
+
export { a as Seq, c as createSeq } from '../index-BWBqO3Kp.mjs';
|
|
2
|
+
import '../typeable/Typeable.mjs';
|
|
2
3
|
import '../functor/index.mjs';
|
|
3
4
|
import '../identity/Identity.mjs';
|
|
4
5
|
import '../tuple/Tuple.mjs';
|
|
5
|
-
import '../typeable/Typeable.mjs';
|
package/dist/iterable/Seq.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as Seq, c as createSeq } from '../index-
|
|
1
|
+
export { a as Seq, c as createSeq } from '../index-DQD4k2t3.js';
|
|
2
|
+
import '../typeable/Typeable.js';
|
|
2
3
|
import '../functor/index.js';
|
|
3
4
|
import '../identity/Identity.js';
|
|
4
5
|
import '../tuple/Tuple.js';
|
|
5
|
-
import '../typeable/Typeable.js';
|
package/dist/iterable/Seq.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunkHGAOWVBIjs.e; exports.createSeq = _chunkHGAOWVBIjs.d;
|
package/dist/iterable/Seq.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a,e as b}from"../chunk-
|
|
1
|
+
import{d as a,e as b}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as Seq,a as createSeq};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../functor/index.mjs';
|
|
2
|
-
export { a as Seq, _ as _Iterable_ } from '../index-
|
|
2
|
+
export { a as Seq, _ as _Iterable_ } from '../index-BWBqO3Kp.mjs';
|
|
3
3
|
import '../identity/Identity.mjs';
|
|
4
4
|
import '../tuple/Tuple.mjs';
|
|
5
5
|
import '../typeable/Typeable.mjs';
|
package/dist/iterable/index.d.ts
CHANGED
package/dist/iterable/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunkHGAOWVBIjs.e;
|
package/dist/iterable/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a}from"../chunk-
|
|
1
|
+
import{e as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Seq};
|
package/dist/list/List.d.mts
CHANGED
package/dist/list/List.d.ts
CHANGED
package/dist/list/List.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.List = _chunkHGAOWVBIjs.g; exports.TestList = _chunkHGAOWVBIjs.h;
|
package/dist/list/List.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a,h as b}from"../chunk-
|
|
1
|
+
import{g as a,h as b}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as List,b as TestList};
|
package/dist/map/Map.d.mts
CHANGED
package/dist/map/Map.d.ts
CHANGED
package/dist/map/Map.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Map = _chunkHGAOWVBIjs.r;
|
package/dist/map/Map.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"../chunk-
|
|
1
|
+
import{r as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Map};
|
package/dist/option/Option.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../functor/index.mjs';
|
|
2
|
-
export { N as None, O as Option, S as Some } from '../index-
|
|
2
|
+
export { N as None, O as Option, S as Some } from '../index-BWBqO3Kp.mjs';
|
|
3
3
|
import '../typeable/Typeable.mjs';
|
|
4
4
|
import '../identity/Identity.mjs';
|
|
5
5
|
import '../tuple/Tuple.mjs';
|
package/dist/option/Option.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../functor/index.js';
|
|
2
|
-
export { N as None, O as Option, S as Some } from '../index-
|
|
2
|
+
export { N as None, O as Option, S as Some } from '../index-DQD4k2t3.js';
|
|
3
3
|
import '../typeable/Typeable.js';
|
|
4
4
|
import '../identity/Identity.js';
|
|
5
5
|
import '../tuple/Tuple.js';
|
package/dist/option/Option.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.None = _chunkHGAOWVBIjs.b; exports.Option = _chunkHGAOWVBIjs.c; exports.Some = _chunkHGAOWVBIjs.a;
|
package/dist/option/Option.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as None,c as Option,a as Some};
|
package/dist/set/Set.d.mts
CHANGED
package/dist/set/Set.d.ts
CHANGED
package/dist/set/Set.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Set = _chunkHGAOWVBIjs.f;
|
package/dist/set/Set.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a}from"../chunk-
|
|
1
|
+
import{f as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Set};
|
package/dist/try/Try.d.mts
CHANGED
package/dist/try/Try.d.ts
CHANGED
package/dist/try/Try.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Try = _chunkHGAOWVBIjs.s;
|
package/dist/try/Try.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as a}from"../chunk-
|
|
1
|
+
import{s as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Try};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare function Typeable
|
|
2
|
-
readonly _tag:
|
|
1
|
+
declare function Typeable(type: string): {
|
|
2
|
+
readonly _tag: string;
|
|
3
3
|
};
|
|
4
|
-
type Typeable<T extends string> = ReturnType<typeof Typeable
|
|
4
|
+
type Typeable<T extends string> = ReturnType<typeof Typeable>;
|
|
5
5
|
|
|
6
6
|
export { Typeable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare function Typeable
|
|
2
|
-
readonly _tag:
|
|
1
|
+
declare function Typeable(type: string): {
|
|
2
|
+
readonly _tag: string;
|
|
3
3
|
};
|
|
4
|
-
type Typeable<T extends string> = ReturnType<typeof Typeable
|
|
4
|
+
type Typeable<T extends string> = ReturnType<typeof Typeable>;
|
|
5
5
|
|
|
6
6
|
export { Typeable };
|
package/dist/util/index.d.mts
CHANGED
package/dist/util/index.d.ts
CHANGED
package/dist/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkE6RS47F7js = require('../chunk-E6RS47F7.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkE6RS47F7js = require('../chunk-E6RS47F7.js');var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');var a=o=>{let r=parseInt(o,10);return isNaN(r)?_chunkHGAOWVBIjs.j.call(void 0, _chunkE6RS47F7js.a.call(void 0, `${r}`)):_chunkHGAOWVBIjs.i.call(void 0, r)};exports.parseNumber = a;
|
package/dist/util/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"../chunk-VK5GL6NM.mjs";import{i as e,j as t}from"../chunk-
|
|
1
|
+
import{a as s}from"../chunk-VK5GL6NM.mjs";import{i as e,j as t}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";var a=o=>{let r=parseInt(o,10);return isNaN(r)?t(s(`${r}`)):e(r)};export{a as parseNumber};
|
package/lib/iterable/Seq.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Option } from "../option/Option";
|
|
2
|
+
import { Typeable } from "../typeable/Typeable";
|
|
2
3
|
import { _Iterable_ } from "./index";
|
|
3
4
|
export type Seq<A> = {
|
|
4
5
|
readonly length: number;
|
|
@@ -21,6 +22,10 @@ export type Seq<A> = {
|
|
|
21
22
|
foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
|
|
22
23
|
foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
|
|
23
24
|
toString: () => string;
|
|
24
|
-
|
|
25
|
+
toValue: () => {
|
|
26
|
+
_tag: string;
|
|
27
|
+
value: A[];
|
|
28
|
+
};
|
|
29
|
+
} & _Iterable_<A> & Typeable<"Seq">;
|
|
25
30
|
export declare const createSeq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
|
|
26
31
|
export declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
|
package/lib/list/List.d.ts
CHANGED
|
@@ -16,10 +16,10 @@ export type List<A> = {
|
|
|
16
16
|
toSet: () => Set<A>;
|
|
17
17
|
toString: () => string;
|
|
18
18
|
toValue: () => {
|
|
19
|
-
_tag:
|
|
20
|
-
value:
|
|
19
|
+
_tag: string;
|
|
20
|
+
value: A[];
|
|
21
21
|
};
|
|
22
|
-
} &
|
|
22
|
+
} & Seq<A> & Typeable<"List">;
|
|
23
23
|
type InternalList<A> = List<A> & ArrayLike<A> & _Iterable_<A> & Collection<A>;
|
|
24
24
|
export declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
|
|
25
25
|
export declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function Typeable
|
|
2
|
-
readonly _tag:
|
|
1
|
+
export declare function Typeable(type: string): {
|
|
2
|
+
readonly _tag: string;
|
|
3
3
|
};
|
|
4
|
-
export type Typeable<T extends string> = ReturnType<typeof Typeable
|
|
4
|
+
export type Typeable<T extends string> = ReturnType<typeof Typeable>;
|
package/package.json
CHANGED
package/dist/chunk-H4VE5SDW.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunk-2I2NKDFN.mjs";import{a as b}from"./chunk-RRAIFS3D.mjs";import{a as E}from"./chunk-377WQNCB.mjs";import{a as U}from"./chunk-HA5XD5KC.mjs";import D from"safe-stable-stringify";var y=e=>{let t=b(e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t);return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},map:o=>y(r.map(o)),flatMap:o=>y(r.flatMap(n=>o(n).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>y(r.filter(o)),filterNot:o=>y(r.filter(n=>!o(n))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):L()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>n=>r.reduce(n,o),foldRight:o=>n=>r.reduceRight((a,u)=>n(u,a),o),toString:()=>`Seq(${D(e)})`}},T=e=>y(e);var h=e=>{let t=b(e)?new U(e):new U(e?.toArray()??[]),r=T(t),o={...r,add:n=>h([...t,n]),remove:n=>{let a=new U(t);return a.delete(n),h(a)},contains:n=>t.has(n),has:n=>t.has(n),map:n=>h(r.map(n)),flatMap:n=>h(r.flatMap(n)),toList:()=>p(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},R=e=>h(e);import G from"safe-stable-stringify";var c=e=>{function t(a){return a!=null&&typeof a[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],o=T(r),n={...o,_tag:"List",length:r.length,map:a=>c(r.map(a)),flatMap:a=>c(o.flatMap(a)),remove:a=>{let u=r.indexOf(a);return n.removeAt(u)},contains:a=>r.includes(a),add:a=>c([...r,a]),removeAt:a=>a<0||a>=r.length?n:c([...r.slice(0,a),...r.slice(a+1)]),get:a=>A(r[a]),concat:a=>c([...r,...a.toArray()]),toList:()=>n,toSet:()=>R(r),toValue:()=>({_tag:"List",value:r}),toString:()=>`List(${G(p(r))})`};return new Proxy(n,{get(a,u){return typeof u=="symbol"||isNaN(Number(u))?a[u]:a.get(Number(u))}})},p=e=>c(e),H=e=>c(e);console.assert(H);import v from"safe-stable-stringify";var V=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>d(e),toList:()=>p([e]),toString:()=>`Right(${v(e)})`}),O=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>L(),toList:()=>p(),toString:()=>`Left(${v(e)})`}),f=e=>V(e),s=e=>O(e),B=e=>e.isRight(),K=e=>e.isLeft(),Be=(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},J=e=>V(e);console.assert(J);var Q=e=>O(e);console.assert(Q);var xe=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return s(t(r))}};function x(e){return{value:e,map(t){let r=e.then(o=>{if(B(o))try{let n=t(o.value);return f(n)}catch(n){return s(n)}else return s(o.value)});return x(r)},flatMap(t){let r=e.then(o=>{if(B(o))try{return t(o.value).value}catch(n){return Promise.resolve(s(n))}else return Promise.resolve(s(o.value))});return x(r)},mapLeft(t){let r=e.then(o=>{if(K(o))try{let n=t(o.value);return s(n)}catch(n){return s(n)}else return f(o.value)});return x(r)},fold(t,r){return e.then(o=>B(o)?r(o.value):t(o.value))}}}var m=e=>{let t={values:new E(e)},r=()=>Array.from(t.values.entries()).map(([i,l])=>_([i,l])),o=i=>m(new E(t.values).set(i.toArray()[0],i.toArray()[1]).entries()),n=i=>{let l=new E(t.values);return l.delete(i)?m(l.entries()):m(t.values.entries())},a=i=>t.values.get(i[0])===i[1],u=()=>t.values.size,w=i=>m(Array.from(t.values.entries()).map(([l,j])=>[l,i(j)])),P=i=>{let l=m(t.values.entries()).toList();return m(l.flatMap(i).toArray())},q=i=>T(r()).reduce(i),z=i=>T(r()).reduceRight(i),N=i=>l=>T(r()).foldLeft(i)(l),k=i=>l=>T(r()).foldRight(i)(l),F=i=>A(t.values.get(i)),C=(i,l)=>A(t.values.get(i)).getOrElse(l),$=()=>t.values.size===0;return{add:o,remove:n,contains:a,get size(){return u()},map:w,flatMap:P,reduce:q,reduceRight:z,foldLeft:N,foldRight:k,get:F,getOrElse:C,get isEmpty(){return $()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>p(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne=e=>m(e);import I from"safe-stable-stringify";var M=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>M(e),orThrow:t=>e,toEither:()=>f(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${I(e)})`}),S=e=>({_tag:"Failure",value:void 0,error:e,isSuccess:()=>!1,isFailure:()=>!0,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>s(e),map:t=>S(e),flatMap:t=>S(e),toString:()=>`Failure(${I(e)}))`}),W=e=>{try{return M(e())}catch(t){return S(t instanceof Error?t:new Error(String(t)))}};import X from"safe-stable-stringify";var d=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>d(e),map:t=>d(t(e)),filter(t){return t(e)?d(e):g},flatMap:t=>t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>p([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${X(e)})`,toValue:()=>({_tag:"Some",value:e})}),g={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>g,filter(e){return g},flatMap:e=>g,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},L=()=>g,A=e=>e!=null?d(e):L();export{d as a,L as b,A as c,y as d,T as e,R as f,p as g,H as h,f as i,s as j,B as k,K as l,Be as m,J as n,Q as o,xe as p,x as q,Ne as r,W as s};
|
package/dist/chunk-XKERTVFW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var _safestablestringify = require('safe-stable-stringify'); var _safestablestringify2 = _interopRequireDefault(_safestablestringify);var y=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t);return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},map:o=>y(r.map(o)),flatMap:o=>y(r.flatMap(n=>o(n).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>y(r.filter(o)),filterNot:o=>y(r.filter(n=>!o(n))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):L()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>n=>r.reduce(n,o),foldRight:o=>n=>r.reduceRight((a,u)=>n(u,a),o),toString:()=>`Seq(${_safestablestringify2.default.call(void 0, e)})`}},T= exports.e =e=>y(e);var h=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?new (0, _chunk3VJERXBPjs.a)(e):new (0, _chunk3VJERXBPjs.a)(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.toArray, 'call', _3 => _3()]), () => ([]))),r=T(t),o={...r,add:n=>h([...t,n]),remove:n=>{let a=new (0, _chunk3VJERXBPjs.a)(t);return a.delete(n),h(a)},contains:n=>t.has(n),has:n=>t.has(n),map:n=>h(r.map(n)),flatMap:n=>h(r.flatMap(n)),toList:()=>p(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},R= exports.f =e=>h(e);var c=e=>{function t(a){return a!=null&&typeof a[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],o=T(r),n={...o,_tag:"List",length:r.length,map:a=>c(r.map(a)),flatMap:a=>c(o.flatMap(a)),remove:a=>{let u=r.indexOf(a);return n.removeAt(u)},contains:a=>r.includes(a),add:a=>c([...r,a]),removeAt:a=>a<0||a>=r.length?n:c([...r.slice(0,a),...r.slice(a+1)]),get:a=>A(r[a]),concat:a=>c([...r,...a.toArray()]),toList:()=>n,toSet:()=>R(r),toValue:()=>({_tag:"List",value:r}),toString:()=>`List(${_safestablestringify2.default.call(void 0, p(r))})`};return new Proxy(n,{get(a,u){return typeof u=="symbol"||isNaN(Number(u))?a[u]:a.get(Number(u))}})},p= exports.g =e=>c(e),H= exports.h =e=>c(e);console.assert(H);var V=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>d(e),toList:()=>p([e]),toString:()=>`Right(${_safestablestringify2.default.call(void 0, e)})`}),O=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>L(),toList:()=>p(),toString:()=>`Left(${_safestablestringify2.default.call(void 0, e)})`}),f= exports.i =e=>V(e),s= exports.j =e=>O(e),B= exports.k =e=>e.isRight(),K= exports.l =e=>e.isLeft(),Be= exports.m =(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},J= exports.n =e=>V(e);console.assert(J);var Q=e=>O(e);console.assert(Q);var xe=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return s(t(r))}};function x(e){return{value:e,map(t){let r=e.then(o=>{if(B(o))try{let n=t(o.value);return f(n)}catch(n){return s(n)}else return s(o.value)});return x(r)},flatMap(t){let r=e.then(o=>{if(B(o))try{return t(o.value).value}catch(n){return Promise.resolve(s(n))}else return Promise.resolve(s(o.value))});return x(r)},mapLeft(t){let r=e.then(o=>{if(K(o))try{let n=t(o.value);return s(n)}catch(n){return s(n)}else return f(o.value)});return x(r)},fold(t,r){return e.then(o=>B(o)?r(o.value):t(o.value))}}}var m=e=>{let t={values:new (0, _chunk5VTXJIR3js.a)(e)},r=()=>Array.from(t.values.entries()).map(([i,l])=>_chunkOXLZ6UIZjs.a.call(void 0, [i,l])),o=i=>m(new (0, _chunk5VTXJIR3js.a)(t.values).set(i.toArray()[0],i.toArray()[1]).entries()),n=i=>{let l=new (0, _chunk5VTXJIR3js.a)(t.values);return l.delete(i)?m(l.entries()):m(t.values.entries())},a=i=>t.values.get(i[0])===i[1],u=()=>t.values.size,w=i=>m(Array.from(t.values.entries()).map(([l,j])=>[l,i(j)])),P=i=>{let l=m(t.values.entries()).toList();return m(l.flatMap(i).toArray())},q=i=>T(r()).reduce(i),z=i=>T(r()).reduceRight(i),N=i=>l=>T(r()).foldLeft(i)(l),k=i=>l=>T(r()).foldRight(i)(l),F=i=>A(t.values.get(i)),C=(i,l)=>A(t.values.get(i)).getOrElse(l),$=()=>t.values.size===0;return{add:o,remove:n,contains:a,get size(){return u()},map:w,flatMap:P,reduce:q,reduceRight:z,foldLeft:N,foldRight:k,get:F,getOrElse:C,get isEmpty(){return $()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>p(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne= exports.r =e=>m(e);var M=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>M(e),orThrow:t=>e,toEither:()=>f(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${_safestablestringify2.default.call(void 0, e)})`}),S=e=>({_tag:"Failure",value:void 0,error:e,isSuccess:()=>!1,isFailure:()=>!0,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>s(e),map:t=>S(e),flatMap:t=>S(e),toString:()=>`Failure(${_safestablestringify2.default.call(void 0, e)}))`}),W= exports.s =e=>{try{return M(e())}catch(t){return S(t instanceof Error?t:new Error(String(t)))}};var d=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>d(e),map:t=>d(t(e)),filter(t){return t(e)?d(e):g},flatMap:t=>t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>p([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${_safestablestringify2.default.call(void 0, e)})`,toValue:()=>({_tag:"Some",value:e})}),g={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>g,filter(e){return g},flatMap:e=>g,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},L= exports.b =()=>g,A= exports.c =e=>e!=null?d(e):L();exports.a = d; exports.b = L; exports.c = A; exports.d = y; exports.e = T; exports.f = R; exports.g = p; exports.h = H; exports.i = f; exports.j = s; exports.k = B; exports.l = K; exports.m = Be; exports.n = J; exports.o = Q; exports.p = xe; exports.q = x; exports.r = Ne; exports.s = W;
|