Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swan-io/boxed

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swan-io/boxed - npm Package Compare versions

Comparing version 0.4.0 to 0.4.2

2

dist/Boxed.esm.js

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

var t=/*#__PURE__*/function(){function t(){this.tag=void 0,this.value=void 0,this.tag="None",this.value=void 0}var n=t.prototype;return n.map=function(n){return"Some"===this.tag?t.Some(n(this.value)):this},n.flatMap=function(t){return"Some"===this.tag?t(this.value):this},n.getWithDefault=function(t){return"Some"===this.tag?this.value:t},n.match=function(t){return"Some"===this.tag?t.Some(this.value):t.None()},n.tap=function(t){return t(this),this},n.toUndefined=function(){return"None"===this.tag?void 0:this.value},n.toNull=function(){return"None"===this.tag?null:this.value},n.isSome=function(){return"Some"===this.tag},n.isNone=function(){return"None"===this.tag},t}();t.Some=function(t){var n=Object.create(r);return n.tag="Some",n.value=t,n},t.None=function(){return e},t.fromNullable=function(n){return null==n?t.None():t.Some(n)},t.fromNull=function(n){return null===n?t.None():t.Some(n)},t.fromUndefined=function(n){return void 0===n?t.None():t.Some(n)},t.all=function(n){for(var r=n.length,e=t.Some([]),o=0,i=function(){if(o>=r)return{v:e};var t=n[o];e=e.flatMap(function(n){return t.map(function(t){return n.push(t),n})}),o++};;){var u=i();if("object"==typeof u)return u.v}},t.equals=function(t,n,r){return t.isSome()&&n.isSome()?r(t.value,n.value):t.tag===n.tag},t.pattern={Some:function(t){return{tag:"Some",value:t}},None:{tag:"None"}},t.prototype.__boxed_type__="Option";var n,r=Object.create(null,Object.getOwnPropertyDescriptors(t.prototype)),e=((n=Object.create(r)).tag="None",n.value=void 0,n),o=function(t,n){return t===n?0:t>n?1:-1},i={__proto__:null,from:Array.from,of:Array.of,isArray:Array.isArray,keepMap:function(t,n){var r=[];return t.forEach(function(t){var e=n(t);null!=e&&r.push(e)}),r},getBy:function(n,r){for(var e=-1;++e<n.length;){var o=n[e];if(r(o))return t.Some(o)}return t.None()},getIndexBy:function(n,r){for(var e=-1;++e<n.length;)if(r(n[e]))return t.Some(e);return t.None()},binarySearchBy:function(t,n,r){if(void 0===r&&(r=o),0===t.length)return-1;for(var e=0,i=t.length-1;;){var u=e+(i-e)/2|0;if(u===e||u===i)return i;var a=r(n,t[u]);if(0===a)return u;a>0?e=u:a<0&&(i=u)}}},u=/*#__PURE__*/function(){function n(){this.tag=void 0,this.value=void 0,this.tag="NotAsked",this.value=void 0}var r=n.prototype;return r.map=function(t){return"Done"===this.tag?n.Done(t(this.value)):this},r.flatMap=function(t){return"Done"===this.tag?t(this.value):this},r.getWithDefault=function(t){return"Done"===this.tag?this.value:t},r.match=function(t){return"Done"===this.tag?t.Done(this.value):"Loading"===this.tag?t.Loading():t.NotAsked()},r.tap=function(t){return t(this),this},r.isDone=function(){return"Done"===this.tag},r.isLoading=function(){return"Loading"===this.tag},r.isNotAsked=function(){return"NotAsked"===this.tag},r.toOption=function(){return"Done"===this.tag?t.Some(this.value):t.None()},n}();u.Done=function(t){var n=Object.create(c);return n.tag="Done",n.value=t,n},u.Loading=function(){return s},u.NotAsked=function(){return f},u.all=function(t){for(var n=t.length,r=u.Done([]),e=0,o=function(){if(e>=n)return{v:r};var o=t[e];r=r.flatMap(function(t){return o.map(function(n){return t.push(n),t})}),e++};;){var i=o();if("object"==typeof i)return i.v}},u.equals=function(t,n,r){return t.isDone()&&n.isDone()?r(t.value,n.value):t.tag===n.tag},u.pattern={Done:function(t){return{tag:"Done",value:t}},NotAsked:{tag:"NotAsked"},Loading:{tag:"Loading"}},u.prototype.__boxed_type__="AsyncData";var a,c=Object.create(null,Object.getOwnPropertyDescriptors(u.prototype)),s=((a=Object.create(c)).tag="Loading",a.value=void 0,a),f=function(){var t=Object.create(c);return t.tag="NotAsked",t.value=void 0,t}(),l=/*#__PURE__*/function(){function n(){this.tag=void 0,this.value=void 0,this.error=void 0,this.tag=void 0,this.value=void 0,this.error=void 0}n.fromPromise=function(t){try{return Promise.resolve(function(r,e){try{var o=Promise.resolve(t).then(function(t){return n.Ok(t)})}catch(t){return e(t)}return o&&o.then?o.then(void 0,e):o}(0,function(t){return n.Error(t)}))}catch(t){return Promise.reject(t)}};var r=n.prototype;return r.map=function(t){return"Ok"===this.tag?n.Ok(t(this.value)):this},r.mapError=function(t){return"Ok"===this.tag?this:n.Error(t(this.error))},r.flatMap=function(t){return"Ok"===this.tag?t(this.value):this},r.flatMapError=function(t){return"Ok"===this.tag?this:t(this.error)},r.getWithDefault=function(t){return"Ok"===this.tag?this.value:t},r.match=function(t){return"Ok"===this.tag?t.Ok(this.value):t.Error(this.error)},r.tap=function(t){return t(this),this},r.tapOk=function(t){return this.isOk()&&t(this.value),this},r.tapError=function(t){return this.isError()&&t(this.error),this},r.isOk=function(){return"Ok"===this.tag},r.isError=function(){return"Error"===this.tag},r.toOption=function(){return"Ok"===this.tag?t.Some(this.value):t.None()},n}();l.Ok=function(t){var n=Object.create(h);return n.tag="Ok",n.value=t,n},l.Error=function(t){var n=Object.create(h);return n.tag="Error",n.error=t,n},l.fromExecution=function(t){try{return l.Ok(t())}catch(t){return l.Error(t)}},l.all=function(t){for(var n=t.length,r=l.Ok([]),e=0,o=function(){if(e>=n)return{v:r};var o=t[e];r=r.flatMap(function(t){return o.map(function(n){return t.push(n),t})}),e++};;){var i=o();if("object"==typeof i)return i.v}},l.equals=function(t,n,r){return t.tag===n.tag&&("Error"===t.tag&&"Error"===n.tag||r(t.value,n.value))},l.pattern={Ok:function(t){return{tag:"Ok",value:t}},Error:function(t){return{tag:"Error",error:t}}},l.prototype.__boxed_type__="Result";var h=Object.create(null,Object.getOwnPropertyDescriptors(l.prototype));function v(t){var n=this,r={};this.tag="Pending",this.pending=r,r.cancel=t(function(t){if("Pending"===n.tag){var r=n.pending.resolveCallbacks;null==r||r.forEach(function(n){return n(t)}),n.tag="Resolved",n.value=t,n.pending=void 0}})}var g=/*#__PURE__*/function(){function t(t){this.tag=void 0,this.value=void 0,this.pending=void 0,this.tag="Pending",this.pending={}}t.fromPromise=function(n){return t.make(function(t){n.then(function(n){return t(l.Ok(n))},function(n){return t(l.Error(n))})})};var n=t.prototype;return n.isPending=function(){return"Pending"===this.tag},n.isCancelled=function(){return"Cancelled"===this.tag},n.isResolved=function(){return"Resolved"===this.tag},n.get=function(t){if(this.isPending()){var n,r=this.pending;r.resolveCallbacks=null!=(n=r.resolveCallbacks)?n:[],r.resolveCallbacks.push(t)}this.isResolved()&&t(this.value)},n.onCancel=function(t){if(this.isPending()){var n,r=this.pending;r.cancelCallbacks=null!=(n=r.cancelCallbacks)?n:[],r.cancelCallbacks.push(t)}this.isCancelled()&&t()},n.cancel=function(){if("Pending"===this.tag){this.tag="Cancelled",this.value=void 0;var t=this.pending,n=t.cancelCallbacks;null==t.cancel||t.cancel(),null==n||n.forEach(function(t){return t()}),this.pending=void 0}},n.map=function(n,r){var e=this;void 0===r&&(r=!1);var o=t.make(function(t){if(e.get(function(r){t(n(r))}),r)return function(){e.cancel()}});return this.onCancel(function(){o.cancel()}),o},n.then=function(t){return this.get(t),this},n.flatMap=function(n,r){var e=this;void 0===r&&(r=!1);var o=t.make(function(t){if(e.get(function(r){var e=n(r);e.get(t),e.onCancel(function(){return o.cancel()})}),r)return function(){e.cancel()}});return this.onCancel(function(){o.cancel()}),o},n.tap=function(t){return this.get(t),this},n.tapOk=function(t){return this.get(function(n){n.match({Ok:function(n){return t(n)},Error:function(){}})}),this},n.tapError=function(t){return this.get(function(n){n.match({Ok:function(){},Error:function(n){return t(n)}})}),this},n.mapResult=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return t(n)},Error:function(){return n}})},n)},n.mapOk=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return l.Ok(t(n))},Error:function(){return n}})},n)},n.mapError=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(){return n},Error:function(n){return l.Error(t(n))}})},n)},n.flatMapOk=function(n,r){return void 0===r&&(r=!1),this.flatMap(function(r){return r.match({Ok:function(t){return n(t)},Error:function(){return t.value(r)}})},r)},n.flatMapError=function(n,r){return void 0===r&&(r=!1),this.flatMap(function(r){return r.match({Ok:function(){return t.value(r)},Error:function(t){return n(t)}})},r)},n.toPromise=function(){var t=this;return new Promise(function(n){t.get(n)})},n.resultToPromise=function(){var t=this;return new Promise(function(n,r){t.get(function(t){t.match({Ok:n,Error:r})})})},t}();g.make=function(t){var n=Object.create(p);return v.call(n,t),n},g.value=function(t){var n=Object.create(p);return v.call(n,function(n){return n(t)}),n},g.all=function(t,n){void 0===n&&(n=!1);for(var r=t.length,e=g.value([]),o=0,i=function(){if(o>=r)return{v:e};var i=t[o];e=e.flatMap(function(t){return i.map(function(n){return t.push(n),t},n)},n),o++};;){var u=i();if("object"==typeof u)return u.v}};var p=Object.create(null,Object.getOwnPropertyDescriptors(g.prototype)),d={make:function(){var t=void 0;return[g.make(function(n){t=n}),t]}},_={__proto__:null,entries:function(t){return Object.entries(t)},keys:function(t){return Object.keys(t)},values:function(t){return Object.values(t)}},m=Symbol.for("NOT_COMPUTED"),O=function(t){var n={contents:m};return{get value(){return n.contents===m&&(n.contents=t()),n.contents}}},k={__proto__:null,encode:function(t,n){return JSON.stringify(t,function(t,n){if(null!=n)return"Option"===n.__boxed_type__?{__boxed_type__:"Option",tag:n.tag,value:n.value}:"Result"===n.__boxed_type__?"Error"===n.tag?{__boxed_type__:"Result",tag:n.tag,error:n.error}:{__boxed_type__:"Result",tag:n.tag,value:n.value}:"AsyncData"===n.__boxed_type__?{__boxed_type__:"AsyncData",tag:n.tag,value:n.value}:n},n)},decode:function(n){return JSON.parse(n,function(n,r){return null==r?r:"Option"===r.__boxed_type__?"Some"===r.tag?t.Some(r.value):t.None():"Result"===r.__boxed_type__?"Ok"===r.tag?l.Ok(r.value):l.Error(r.error):"AsyncData"===r.__boxed_type__?"NotAsked"===r.tag?u.NotAsked():"Loading"===r.tag?u.Loading():u.Done(r.value):r})}};export{i as Array,u as AsyncData,d as Deferred,_ as Dict,g as Future,O as Lazy,t as Option,l as Result,k as Serializer};
var t=/*#__PURE__*/function(){function t(){this.tag=void 0,this.value=void 0,this.tag="None",this.value=void 0}var n=t.prototype;return n.map=function(n){return"Some"===this.tag?t.Some(n(this.value)):this},n.flatMap=function(t){return"Some"===this.tag?t(this.value):this},n.getWithDefault=function(t){return"Some"===this.tag?this.value:t},n.match=function(t){return"Some"===this.tag?t.Some(this.value):t.None()},n.tap=function(t){return t(this),this},n.toUndefined=function(){return"None"===this.tag?void 0:this.value},n.toNull=function(){return"None"===this.tag?null:this.value},n.isSome=function(){return"Some"===this.tag},n.isNone=function(){return"None"===this.tag},t}();t.Some=function(t){var n=Object.create(e);return n.tag="Some",n.value=t,n},t.None=function(){return r},t.fromNullable=function(n){return null==n?t.None():t.Some(n)},t.fromNull=function(n){return null===n?t.None():t.Some(n)},t.fromUndefined=function(n){return void 0===n?t.None():t.Some(n)},t.all=function(n){for(var e=n.length,r=t.Some([]),u=0,o=function(){if(u>=e)return{v:r};var t=n[u];r=r.flatMap(function(n){return t.map(function(t){return n.push(t),n})}),u++};;){var i=o();if("object"==typeof i)return i.v}},t.equals=function(t,n,e){return t.isSome()&&n.isSome()?e(t.value,n.value):t.tag===n.tag},t.pattern={Some:function(t){return{tag:"Some",value:t}},None:{tag:"None"}},t.prototype.__boxed_type__="Option";var n,e=Object.create(null,Object.getOwnPropertyDescriptors(t.prototype)),r=((n=Object.create(e)).tag="None",n.value=void 0,n),u=function(t,n){return t===n?0:t>n?1:-1},o={__proto__:null,from:Array.from,of:Array.of,isArray:Array.isArray,keepMap:function(t,n){var e=[];return t.forEach(function(t){var r=n(t);null!=r&&e.push(r)}),e},getBy:function(n,e){for(var r=-1;++r<n.length;){var u=n[r];if(e(u))return t.Some(u)}return t.None()},getIndexBy:function(n,e){for(var r=-1;++r<n.length;)if(e(n[r]))return t.Some(r);return t.None()},binarySearchBy:function(t,n,e){if(void 0===e&&(e=u),0===t.length)return-1;for(var r=0,o=t.length-1;;){var i=r+(o-r)/2|0;if(i===r||i===o)return o;var a=e(n,t[i]);if(0===a)return i;a>0?r=i:a<0&&(o=i)}}},i=/*#__PURE__*/function(){function n(){this.tag=void 0,this.value=void 0,this.tag="NotAsked",this.value=void 0}var e=n.prototype;return e.map=function(t){return"Done"===this.tag?n.Done(t(this.value)):this},e.flatMap=function(t){return"Done"===this.tag?t(this.value):this},e.getWithDefault=function(t){return"Done"===this.tag?this.value:t},e.match=function(t){return"Done"===this.tag?t.Done(this.value):"Loading"===this.tag?t.Loading():t.NotAsked()},e.tap=function(t){return t(this),this},e.isDone=function(){return"Done"===this.tag},e.isLoading=function(){return"Loading"===this.tag},e.isNotAsked=function(){return"NotAsked"===this.tag},e.toOption=function(){return"Done"===this.tag?t.Some(this.value):t.None()},n}();i.Done=function(t){var n=Object.create(c);return n.tag="Done",n.value=t,n},i.Loading=function(){return l},i.NotAsked=function(){return f},i.all=function(t){for(var n=t.length,e=i.Done([]),r=0,u=function(){if(r>=n)return{v:e};var u=t[r];e=e.flatMap(function(t){return u.map(function(n){return t.push(n),t})}),r++};;){var o=u();if("object"==typeof o)return o.v}},i.equals=function(t,n,e){return t.isDone()&&n.isDone()?e(t.value,n.value):t.tag===n.tag},i.pattern={Done:function(t){return{tag:"Done",value:t}},NotAsked:{tag:"NotAsked"},Loading:{tag:"Loading"}},i.prototype.__boxed_type__="AsyncData";var a,c=Object.create(null,Object.getOwnPropertyDescriptors(i.prototype)),l=((a=Object.create(c)).tag="Loading",a.value=void 0,a),f=function(){var t=Object.create(c);return t.tag="NotAsked",t.value=void 0,t}(),s=/*#__PURE__*/function(){function n(){this.value=void 0,this.value={tag:"Error",value:void 0}}n.fromPromise=function(t){try{return Promise.resolve(function(e,r){try{var u=Promise.resolve(t).then(function(t){return n.Ok(t)})}catch(t){return r(t)}return u&&u.then?u.then(void 0,r):u}(0,function(t){return n.Error(t)}))}catch(t){return Promise.reject(t)}};var e=n.prototype;return e.map=function(t){return"Ok"===this.value.tag?n.Ok(t(this.value.value)):this},e.mapError=function(t){return"Ok"===this.value.tag?this:n.Error(t(this.value.value))},e.flatMap=function(t){return"Ok"===this.value.tag?t(this.value.value):this},e.flatMapError=function(t){return"Ok"===this.value.tag?this:t(this.value.value)},e.getWithDefault=function(t){return"Ok"===this.value.tag?this.value.value:t},e.match=function(t){return"Ok"===this.value.tag?t.Ok(this.value.value):t.Error(this.value.value)},e.tap=function(t){return t(this),this},e.tapOk=function(t){return this.isOk()&&t(this.value.value),this},e.tapError=function(t){return this.isError()&&t(this.value.value),this},e.isOk=function(){return"Ok"===this.value.tag},e.isError=function(){return"Error"===this.value.tag},e.toOption=function(){return"Ok"===this.value.tag?t.Some(this.value.value):t.None()},n}();s.Ok=function(t){var n=Object.create(v);return n.value={tag:"Ok",value:t},n},s.Error=function(t){var n=Object.create(v);return n.value={tag:"Error",value:t},n},s.fromExecution=function(t){try{return s.Ok(t())}catch(t){return s.Error(t)}},s.all=function(t){for(var n=t.length,e=s.Ok([]),r=0,u=function(){if(r>=n)return{v:e};var u=t[r];e=e.flatMap(function(t){return u.map(function(n){return t.push(n),t})}),r++};;){var o=u();if("object"==typeof o)return o.v}},s.equals=function(t,n,e){return t.value.tag===n.value.tag&&(!(!t.isError()||!n.isError())||e(t.value.value,n.value.value))},s.pattern={Ok:function(t){return{value:{tag:"Ok",value:t}}},Error:function(t){return{value:{tag:"Error",value:t}}}},s.prototype.__boxed_type__="Result";var v=Object.create(null,Object.getOwnPropertyDescriptors(s.prototype));function h(t){var n=this,e={};this.tag="Pending",this.pending=e,e.cancel=t(function(t){if("Pending"===n.tag){var e=n.pending.resolveCallbacks;null==e||e.forEach(function(n){return n(t)}),n.tag="Resolved",n.value=t,n.pending=void 0}})}var g=/*#__PURE__*/function(){function t(t){this.tag=void 0,this.value=void 0,this.pending=void 0,this.tag="Pending",this.pending={}}t.fromPromise=function(n){return t.make(function(t){n.then(function(n){return t(s.Ok(n))},function(n){return t(s.Error(n))})})};var n=t.prototype;return n.isPending=function(){return"Pending"===this.tag},n.isCancelled=function(){return"Cancelled"===this.tag},n.isResolved=function(){return"Resolved"===this.tag},n.get=function(t){if(this.isPending()){var n,e=this.pending;e.resolveCallbacks=null!=(n=e.resolveCallbacks)?n:[],e.resolveCallbacks.push(t)}this.isResolved()&&t(this.value)},n.onCancel=function(t){if(this.isPending()){var n,e=this.pending;e.cancelCallbacks=null!=(n=e.cancelCallbacks)?n:[],e.cancelCallbacks.push(t)}this.isCancelled()&&t()},n.cancel=function(){if("Pending"===this.tag){this.tag="Cancelled",this.value=void 0;var t=this.pending,n=t.cancelCallbacks;null==t.cancel||t.cancel(),null==n||n.forEach(function(t){return t()}),this.pending=void 0}},n.map=function(n,e){var r=this;void 0===e&&(e=!1);var u=t.make(function(t){if(r.get(function(e){t(n(e))}),e)return function(){r.cancel()}});return this.onCancel(function(){u.cancel()}),u},n.then=function(t){return this.get(t),this},n.flatMap=function(n,e){var r=this;void 0===e&&(e=!1);var u=t.make(function(t){if(r.get(function(e){var r=n(e);r.get(t),r.onCancel(function(){return u.cancel()})}),e)return function(){r.cancel()}});return this.onCancel(function(){u.cancel()}),u},n.tap=function(t){return this.get(t),this},n.tapOk=function(t){return this.get(function(n){n.match({Ok:function(n){return t(n)},Error:function(){}})}),this},n.tapError=function(t){return this.get(function(n){n.match({Ok:function(){},Error:function(n){return t(n)}})}),this},n.mapResult=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return t(n)},Error:function(){return n}})},n)},n.mapOk=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return s.Ok(t(n))},Error:function(){return n}})},n)},n.mapError=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(){return n},Error:function(n){return s.Error(t(n))}})},n)},n.flatMapOk=function(n,e){return void 0===e&&(e=!1),this.flatMap(function(e){return e.match({Ok:function(t){return n(t)},Error:function(){return t.value(e)}})},e)},n.flatMapError=function(n,e){return void 0===e&&(e=!1),this.flatMap(function(e){return e.match({Ok:function(){return t.value(e)},Error:function(t){return n(t)}})},e)},n.toPromise=function(){var t=this;return new Promise(function(n){t.get(n)})},n.resultToPromise=function(){var t=this;return new Promise(function(n,e){t.get(function(t){t.match({Ok:n,Error:e})})})},t}();g.make=function(t){var n=Object.create(p);return h.call(n,t),n},g.value=function(t){var n=Object.create(p);return h.call(n,function(n){return n(t)}),n},g.all=function(t,n){void 0===n&&(n=!1);for(var e=t.length,r=g.value([]),u=0,o=function(){if(u>=e)return{v:r};var o=t[u];r=r.flatMap(function(t){return o.map(function(n){return t.push(n),t},n)},n),u++};;){var i=o();if("object"==typeof i)return i.v}};var p=Object.create(null,Object.getOwnPropertyDescriptors(g.prototype)),d={make:function(){var t=void 0;return[g.make(function(n){t=n}),t]}},m={__proto__:null,entries:function(t){return Object.entries(t)},keys:function(t){return Object.keys(t)},values:function(t){return Object.values(t)}},_=Symbol.for("NOT_COMPUTED"),O=function(t){var n={contents:_};return{get value(){return n.contents===_&&(n.contents=t()),n.contents}}},k={__proto__:null,encode:function(t,n){return JSON.stringify(t,function(t,n){if(null!=n)return"Option"===n.__boxed_type__?{__boxed_type__:"Option",tag:n.tag,value:n.value}:"Result"===n.__boxed_type__?{__boxed_type__:"Result",tag:n.value.tag,value:n.value.value}:"AsyncData"===n.__boxed_type__?{__boxed_type__:"AsyncData",tag:n.tag,value:n.value}:n},n)},decode:function(n){return JSON.parse(n,function(n,e){return null==e?e:"Option"===e.__boxed_type__?"Some"===e.tag?t.Some(e.value):t.None():"Result"===e.__boxed_type__?"Ok"===e.tag?s.Ok(e.value):s.Error(e.value):"AsyncData"===e.__boxed_type__?"NotAsked"===e.tag?i.NotAsked():"Loading"===e.tag?i.Loading():i.Done(e.value):e})}};export{o as Array,i as AsyncData,d as Deferred,m as Dict,g as Future,O as Lazy,t as Option,s as Result,k as Serializer};
//# sourceMappingURL=Boxed.esm.js.map

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

var t=/*#__PURE__*/function(){function t(){this.tag=void 0,this.value=void 0,this.tag="None",this.value=void 0}var n=t.prototype;return n.map=function(n){return"Some"===this.tag?t.Some(n(this.value)):this},n.flatMap=function(t){return"Some"===this.tag?t(this.value):this},n.getWithDefault=function(t){return"Some"===this.tag?this.value:t},n.match=function(t){return"Some"===this.tag?t.Some(this.value):t.None()},n.tap=function(t){return t(this),this},n.toUndefined=function(){return"None"===this.tag?void 0:this.value},n.toNull=function(){return"None"===this.tag?null:this.value},n.isSome=function(){return"Some"===this.tag},n.isNone=function(){return"None"===this.tag},t}();t.Some=function(t){var n=Object.create(r);return n.tag="Some",n.value=t,n},t.None=function(){return e},t.fromNullable=function(n){return null==n?t.None():t.Some(n)},t.fromNull=function(n){return null===n?t.None():t.Some(n)},t.fromUndefined=function(n){return void 0===n?t.None():t.Some(n)},t.all=function(n){for(var r=n.length,e=t.Some([]),o=0,i=function(){if(o>=r)return{v:e};var t=n[o];e=e.flatMap(function(n){return t.map(function(t){return n.push(t),n})}),o++};;){var u=i();if("object"==typeof u)return u.v}},t.equals=function(t,n,r){return t.isSome()&&n.isSome()?r(t.value,n.value):t.tag===n.tag},t.pattern={Some:function(t){return{tag:"Some",value:t}},None:{tag:"None"}},t.prototype.__boxed_type__="Option";var n,r=Object.create(null,Object.getOwnPropertyDescriptors(t.prototype)),e=((n=Object.create(r)).tag="None",n.value=void 0,n),o=function(t,n){return t===n?0:t>n?1:-1},i={__proto__:null,from:Array.from,of:Array.of,isArray:Array.isArray,keepMap:function(t,n){var r=[];return t.forEach(function(t){var e=n(t);null!=e&&r.push(e)}),r},getBy:function(n,r){for(var e=-1;++e<n.length;){var o=n[e];if(r(o))return t.Some(o)}return t.None()},getIndexBy:function(n,r){for(var e=-1;++e<n.length;)if(r(n[e]))return t.Some(e);return t.None()},binarySearchBy:function(t,n,r){if(void 0===r&&(r=o),0===t.length)return-1;for(var e=0,i=t.length-1;;){var u=e+(i-e)/2|0;if(u===e||u===i)return i;var a=r(n,t[u]);if(0===a)return u;a>0?e=u:a<0&&(i=u)}}},u=/*#__PURE__*/function(){function n(){this.tag=void 0,this.value=void 0,this.tag="NotAsked",this.value=void 0}var r=n.prototype;return r.map=function(t){return"Done"===this.tag?n.Done(t(this.value)):this},r.flatMap=function(t){return"Done"===this.tag?t(this.value):this},r.getWithDefault=function(t){return"Done"===this.tag?this.value:t},r.match=function(t){return"Done"===this.tag?t.Done(this.value):"Loading"===this.tag?t.Loading():t.NotAsked()},r.tap=function(t){return t(this),this},r.isDone=function(){return"Done"===this.tag},r.isLoading=function(){return"Loading"===this.tag},r.isNotAsked=function(){return"NotAsked"===this.tag},r.toOption=function(){return"Done"===this.tag?t.Some(this.value):t.None()},n}();u.Done=function(t){var n=Object.create(c);return n.tag="Done",n.value=t,n},u.Loading=function(){return s},u.NotAsked=function(){return f},u.all=function(t){for(var n=t.length,r=u.Done([]),e=0,o=function(){if(e>=n)return{v:r};var o=t[e];r=r.flatMap(function(t){return o.map(function(n){return t.push(n),t})}),e++};;){var i=o();if("object"==typeof i)return i.v}},u.equals=function(t,n,r){return t.isDone()&&n.isDone()?r(t.value,n.value):t.tag===n.tag},u.pattern={Done:function(t){return{tag:"Done",value:t}},NotAsked:{tag:"NotAsked"},Loading:{tag:"Loading"}},u.prototype.__boxed_type__="AsyncData";var a,c=Object.create(null,Object.getOwnPropertyDescriptors(u.prototype)),s=((a=Object.create(c)).tag="Loading",a.value=void 0,a),f=function(){var t=Object.create(c);return t.tag="NotAsked",t.value=void 0,t}(),l=/*#__PURE__*/function(){function n(){this.tag=void 0,this.value=void 0,this.error=void 0,this.tag=void 0,this.value=void 0,this.error=void 0}n.fromPromise=function(t){try{return Promise.resolve(function(r,e){try{var o=Promise.resolve(t).then(function(t){return n.Ok(t)})}catch(t){return e(t)}return o&&o.then?o.then(void 0,e):o}(0,function(t){return n.Error(t)}))}catch(t){return Promise.reject(t)}};var r=n.prototype;return r.map=function(t){return"Ok"===this.tag?n.Ok(t(this.value)):this},r.mapError=function(t){return"Ok"===this.tag?this:n.Error(t(this.error))},r.flatMap=function(t){return"Ok"===this.tag?t(this.value):this},r.flatMapError=function(t){return"Ok"===this.tag?this:t(this.error)},r.getWithDefault=function(t){return"Ok"===this.tag?this.value:t},r.match=function(t){return"Ok"===this.tag?t.Ok(this.value):t.Error(this.error)},r.tap=function(t){return t(this),this},r.tapOk=function(t){return this.isOk()&&t(this.value),this},r.tapError=function(t){return this.isError()&&t(this.error),this},r.isOk=function(){return"Ok"===this.tag},r.isError=function(){return"Error"===this.tag},r.toOption=function(){return"Ok"===this.tag?t.Some(this.value):t.None()},n}();l.Ok=function(t){var n=Object.create(h);return n.tag="Ok",n.value=t,n},l.Error=function(t){var n=Object.create(h);return n.tag="Error",n.error=t,n},l.fromExecution=function(t){try{return l.Ok(t())}catch(t){return l.Error(t)}},l.all=function(t){for(var n=t.length,r=l.Ok([]),e=0,o=function(){if(e>=n)return{v:r};var o=t[e];r=r.flatMap(function(t){return o.map(function(n){return t.push(n),t})}),e++};;){var i=o();if("object"==typeof i)return i.v}},l.equals=function(t,n,r){return t.tag===n.tag&&("Error"===t.tag&&"Error"===n.tag||r(t.value,n.value))},l.pattern={Ok:function(t){return{tag:"Ok",value:t}},Error:function(t){return{tag:"Error",error:t}}},l.prototype.__boxed_type__="Result";var h=Object.create(null,Object.getOwnPropertyDescriptors(l.prototype));function v(t){var n=this,r={};this.tag="Pending",this.pending=r,r.cancel=t(function(t){if("Pending"===n.tag){var r=n.pending.resolveCallbacks;null==r||r.forEach(function(n){return n(t)}),n.tag="Resolved",n.value=t,n.pending=void 0}})}var g=/*#__PURE__*/function(){function t(t){this.tag=void 0,this.value=void 0,this.pending=void 0,this.tag="Pending",this.pending={}}t.fromPromise=function(n){return t.make(function(t){n.then(function(n){return t(l.Ok(n))},function(n){return t(l.Error(n))})})};var n=t.prototype;return n.isPending=function(){return"Pending"===this.tag},n.isCancelled=function(){return"Cancelled"===this.tag},n.isResolved=function(){return"Resolved"===this.tag},n.get=function(t){if(this.isPending()){var n,r=this.pending;r.resolveCallbacks=null!=(n=r.resolveCallbacks)?n:[],r.resolveCallbacks.push(t)}this.isResolved()&&t(this.value)},n.onCancel=function(t){if(this.isPending()){var n,r=this.pending;r.cancelCallbacks=null!=(n=r.cancelCallbacks)?n:[],r.cancelCallbacks.push(t)}this.isCancelled()&&t()},n.cancel=function(){if("Pending"===this.tag){this.tag="Cancelled",this.value=void 0;var t=this.pending,n=t.cancelCallbacks;null==t.cancel||t.cancel(),null==n||n.forEach(function(t){return t()}),this.pending=void 0}},n.map=function(n,r){var e=this;void 0===r&&(r=!1);var o=t.make(function(t){if(e.get(function(r){t(n(r))}),r)return function(){e.cancel()}});return this.onCancel(function(){o.cancel()}),o},n.then=function(t){return this.get(t),this},n.flatMap=function(n,r){var e=this;void 0===r&&(r=!1);var o=t.make(function(t){if(e.get(function(r){var e=n(r);e.get(t),e.onCancel(function(){return o.cancel()})}),r)return function(){e.cancel()}});return this.onCancel(function(){o.cancel()}),o},n.tap=function(t){return this.get(t),this},n.tapOk=function(t){return this.get(function(n){n.match({Ok:function(n){return t(n)},Error:function(){}})}),this},n.tapError=function(t){return this.get(function(n){n.match({Ok:function(){},Error:function(n){return t(n)}})}),this},n.mapResult=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return t(n)},Error:function(){return n}})},n)},n.mapOk=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return l.Ok(t(n))},Error:function(){return n}})},n)},n.mapError=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(){return n},Error:function(n){return l.Error(t(n))}})},n)},n.flatMapOk=function(n,r){return void 0===r&&(r=!1),this.flatMap(function(r){return r.match({Ok:function(t){return n(t)},Error:function(){return t.value(r)}})},r)},n.flatMapError=function(n,r){return void 0===r&&(r=!1),this.flatMap(function(r){return r.match({Ok:function(){return t.value(r)},Error:function(t){return n(t)}})},r)},n.toPromise=function(){var t=this;return new Promise(function(n){t.get(n)})},n.resultToPromise=function(){var t=this;return new Promise(function(n,r){t.get(function(t){t.match({Ok:n,Error:r})})})},t}();g.make=function(t){var n=Object.create(p);return v.call(n,t),n},g.value=function(t){var n=Object.create(p);return v.call(n,function(n){return n(t)}),n},g.all=function(t,n){void 0===n&&(n=!1);for(var r=t.length,e=g.value([]),o=0,i=function(){if(o>=r)return{v:e};var i=t[o];e=e.flatMap(function(t){return i.map(function(n){return t.push(n),t},n)},n),o++};;){var u=i();if("object"==typeof u)return u.v}};var p=Object.create(null,Object.getOwnPropertyDescriptors(g.prototype)),d={make:function(){var t=void 0;return[g.make(function(n){t=n}),t]}},_={__proto__:null,entries:function(t){return Object.entries(t)},keys:function(t){return Object.keys(t)},values:function(t){return Object.values(t)}},m=Symbol.for("NOT_COMPUTED"),O={__proto__:null,encode:function(t,n){return JSON.stringify(t,function(t,n){if(null!=n)return"Option"===n.__boxed_type__?{__boxed_type__:"Option",tag:n.tag,value:n.value}:"Result"===n.__boxed_type__?"Error"===n.tag?{__boxed_type__:"Result",tag:n.tag,error:n.error}:{__boxed_type__:"Result",tag:n.tag,value:n.value}:"AsyncData"===n.__boxed_type__?{__boxed_type__:"AsyncData",tag:n.tag,value:n.value}:n},n)},decode:function(n){return JSON.parse(n,function(n,r){return null==r?r:"Option"===r.__boxed_type__?"Some"===r.tag?t.Some(r.value):t.None():"Result"===r.__boxed_type__?"Ok"===r.tag?l.Ok(r.value):l.Error(r.error):"AsyncData"===r.__boxed_type__?"NotAsked"===r.tag?u.NotAsked():"Loading"===r.tag?u.Loading():u.Done(r.value):r})}};exports.Array=i,exports.AsyncData=u,exports.Deferred=d,exports.Dict=_,exports.Future=g,exports.Lazy=function(t){var n={contents:m};return{get value(){return n.contents===m&&(n.contents=t()),n.contents}}},exports.Option=t,exports.Result=l,exports.Serializer=O;
var t=/*#__PURE__*/function(){function t(){this.tag=void 0,this.value=void 0,this.tag="None",this.value=void 0}var n=t.prototype;return n.map=function(n){return"Some"===this.tag?t.Some(n(this.value)):this},n.flatMap=function(t){return"Some"===this.tag?t(this.value):this},n.getWithDefault=function(t){return"Some"===this.tag?this.value:t},n.match=function(t){return"Some"===this.tag?t.Some(this.value):t.None()},n.tap=function(t){return t(this),this},n.toUndefined=function(){return"None"===this.tag?void 0:this.value},n.toNull=function(){return"None"===this.tag?null:this.value},n.isSome=function(){return"Some"===this.tag},n.isNone=function(){return"None"===this.tag},t}();t.Some=function(t){var n=Object.create(e);return n.tag="Some",n.value=t,n},t.None=function(){return r},t.fromNullable=function(n){return null==n?t.None():t.Some(n)},t.fromNull=function(n){return null===n?t.None():t.Some(n)},t.fromUndefined=function(n){return void 0===n?t.None():t.Some(n)},t.all=function(n){for(var e=n.length,r=t.Some([]),u=0,o=function(){if(u>=e)return{v:r};var t=n[u];r=r.flatMap(function(n){return t.map(function(t){return n.push(t),n})}),u++};;){var i=o();if("object"==typeof i)return i.v}},t.equals=function(t,n,e){return t.isSome()&&n.isSome()?e(t.value,n.value):t.tag===n.tag},t.pattern={Some:function(t){return{tag:"Some",value:t}},None:{tag:"None"}},t.prototype.__boxed_type__="Option";var n,e=Object.create(null,Object.getOwnPropertyDescriptors(t.prototype)),r=((n=Object.create(e)).tag="None",n.value=void 0,n),u=function(t,n){return t===n?0:t>n?1:-1},o={__proto__:null,from:Array.from,of:Array.of,isArray:Array.isArray,keepMap:function(t,n){var e=[];return t.forEach(function(t){var r=n(t);null!=r&&e.push(r)}),e},getBy:function(n,e){for(var r=-1;++r<n.length;){var u=n[r];if(e(u))return t.Some(u)}return t.None()},getIndexBy:function(n,e){for(var r=-1;++r<n.length;)if(e(n[r]))return t.Some(r);return t.None()},binarySearchBy:function(t,n,e){if(void 0===e&&(e=u),0===t.length)return-1;for(var r=0,o=t.length-1;;){var i=r+(o-r)/2|0;if(i===r||i===o)return o;var a=e(n,t[i]);if(0===a)return i;a>0?r=i:a<0&&(o=i)}}},i=/*#__PURE__*/function(){function n(){this.tag=void 0,this.value=void 0,this.tag="NotAsked",this.value=void 0}var e=n.prototype;return e.map=function(t){return"Done"===this.tag?n.Done(t(this.value)):this},e.flatMap=function(t){return"Done"===this.tag?t(this.value):this},e.getWithDefault=function(t){return"Done"===this.tag?this.value:t},e.match=function(t){return"Done"===this.tag?t.Done(this.value):"Loading"===this.tag?t.Loading():t.NotAsked()},e.tap=function(t){return t(this),this},e.isDone=function(){return"Done"===this.tag},e.isLoading=function(){return"Loading"===this.tag},e.isNotAsked=function(){return"NotAsked"===this.tag},e.toOption=function(){return"Done"===this.tag?t.Some(this.value):t.None()},n}();i.Done=function(t){var n=Object.create(c);return n.tag="Done",n.value=t,n},i.Loading=function(){return l},i.NotAsked=function(){return s},i.all=function(t){for(var n=t.length,e=i.Done([]),r=0,u=function(){if(r>=n)return{v:e};var u=t[r];e=e.flatMap(function(t){return u.map(function(n){return t.push(n),t})}),r++};;){var o=u();if("object"==typeof o)return o.v}},i.equals=function(t,n,e){return t.isDone()&&n.isDone()?e(t.value,n.value):t.tag===n.tag},i.pattern={Done:function(t){return{tag:"Done",value:t}},NotAsked:{tag:"NotAsked"},Loading:{tag:"Loading"}},i.prototype.__boxed_type__="AsyncData";var a,c=Object.create(null,Object.getOwnPropertyDescriptors(i.prototype)),l=((a=Object.create(c)).tag="Loading",a.value=void 0,a),s=function(){var t=Object.create(c);return t.tag="NotAsked",t.value=void 0,t}(),f=/*#__PURE__*/function(){function n(){this.value=void 0,this.value={tag:"Error",value:void 0}}n.fromPromise=function(t){try{return Promise.resolve(function(e,r){try{var u=Promise.resolve(t).then(function(t){return n.Ok(t)})}catch(t){return r(t)}return u&&u.then?u.then(void 0,r):u}(0,function(t){return n.Error(t)}))}catch(t){return Promise.reject(t)}};var e=n.prototype;return e.map=function(t){return"Ok"===this.value.tag?n.Ok(t(this.value.value)):this},e.mapError=function(t){return"Ok"===this.value.tag?this:n.Error(t(this.value.value))},e.flatMap=function(t){return"Ok"===this.value.tag?t(this.value.value):this},e.flatMapError=function(t){return"Ok"===this.value.tag?this:t(this.value.value)},e.getWithDefault=function(t){return"Ok"===this.value.tag?this.value.value:t},e.match=function(t){return"Ok"===this.value.tag?t.Ok(this.value.value):t.Error(this.value.value)},e.tap=function(t){return t(this),this},e.tapOk=function(t){return this.isOk()&&t(this.value.value),this},e.tapError=function(t){return this.isError()&&t(this.value.value),this},e.isOk=function(){return"Ok"===this.value.tag},e.isError=function(){return"Error"===this.value.tag},e.toOption=function(){return"Ok"===this.value.tag?t.Some(this.value.value):t.None()},n}();f.Ok=function(t){var n=Object.create(v);return n.value={tag:"Ok",value:t},n},f.Error=function(t){var n=Object.create(v);return n.value={tag:"Error",value:t},n},f.fromExecution=function(t){try{return f.Ok(t())}catch(t){return f.Error(t)}},f.all=function(t){for(var n=t.length,e=f.Ok([]),r=0,u=function(){if(r>=n)return{v:e};var u=t[r];e=e.flatMap(function(t){return u.map(function(n){return t.push(n),t})}),r++};;){var o=u();if("object"==typeof o)return o.v}},f.equals=function(t,n,e){return t.value.tag===n.value.tag&&(!(!t.isError()||!n.isError())||e(t.value.value,n.value.value))},f.pattern={Ok:function(t){return{value:{tag:"Ok",value:t}}},Error:function(t){return{value:{tag:"Error",value:t}}}},f.prototype.__boxed_type__="Result";var v=Object.create(null,Object.getOwnPropertyDescriptors(f.prototype));function h(t){var n=this,e={};this.tag="Pending",this.pending=e,e.cancel=t(function(t){if("Pending"===n.tag){var e=n.pending.resolveCallbacks;null==e||e.forEach(function(n){return n(t)}),n.tag="Resolved",n.value=t,n.pending=void 0}})}var g=/*#__PURE__*/function(){function t(t){this.tag=void 0,this.value=void 0,this.pending=void 0,this.tag="Pending",this.pending={}}t.fromPromise=function(n){return t.make(function(t){n.then(function(n){return t(f.Ok(n))},function(n){return t(f.Error(n))})})};var n=t.prototype;return n.isPending=function(){return"Pending"===this.tag},n.isCancelled=function(){return"Cancelled"===this.tag},n.isResolved=function(){return"Resolved"===this.tag},n.get=function(t){if(this.isPending()){var n,e=this.pending;e.resolveCallbacks=null!=(n=e.resolveCallbacks)?n:[],e.resolveCallbacks.push(t)}this.isResolved()&&t(this.value)},n.onCancel=function(t){if(this.isPending()){var n,e=this.pending;e.cancelCallbacks=null!=(n=e.cancelCallbacks)?n:[],e.cancelCallbacks.push(t)}this.isCancelled()&&t()},n.cancel=function(){if("Pending"===this.tag){this.tag="Cancelled",this.value=void 0;var t=this.pending,n=t.cancelCallbacks;null==t.cancel||t.cancel(),null==n||n.forEach(function(t){return t()}),this.pending=void 0}},n.map=function(n,e){var r=this;void 0===e&&(e=!1);var u=t.make(function(t){if(r.get(function(e){t(n(e))}),e)return function(){r.cancel()}});return this.onCancel(function(){u.cancel()}),u},n.then=function(t){return this.get(t),this},n.flatMap=function(n,e){var r=this;void 0===e&&(e=!1);var u=t.make(function(t){if(r.get(function(e){var r=n(e);r.get(t),r.onCancel(function(){return u.cancel()})}),e)return function(){r.cancel()}});return this.onCancel(function(){u.cancel()}),u},n.tap=function(t){return this.get(t),this},n.tapOk=function(t){return this.get(function(n){n.match({Ok:function(n){return t(n)},Error:function(){}})}),this},n.tapError=function(t){return this.get(function(n){n.match({Ok:function(){},Error:function(n){return t(n)}})}),this},n.mapResult=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return t(n)},Error:function(){return n}})},n)},n.mapOk=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(n){return f.Ok(t(n))},Error:function(){return n}})},n)},n.mapError=function(t,n){return void 0===n&&(n=!1),this.map(function(n){return n.match({Ok:function(){return n},Error:function(n){return f.Error(t(n))}})},n)},n.flatMapOk=function(n,e){return void 0===e&&(e=!1),this.flatMap(function(e){return e.match({Ok:function(t){return n(t)},Error:function(){return t.value(e)}})},e)},n.flatMapError=function(n,e){return void 0===e&&(e=!1),this.flatMap(function(e){return e.match({Ok:function(){return t.value(e)},Error:function(t){return n(t)}})},e)},n.toPromise=function(){var t=this;return new Promise(function(n){t.get(n)})},n.resultToPromise=function(){var t=this;return new Promise(function(n,e){t.get(function(t){t.match({Ok:n,Error:e})})})},t}();g.make=function(t){var n=Object.create(p);return h.call(n,t),n},g.value=function(t){var n=Object.create(p);return h.call(n,function(n){return n(t)}),n},g.all=function(t,n){void 0===n&&(n=!1);for(var e=t.length,r=g.value([]),u=0,o=function(){if(u>=e)return{v:r};var o=t[u];r=r.flatMap(function(t){return o.map(function(n){return t.push(n),t},n)},n),u++};;){var i=o();if("object"==typeof i)return i.v}};var p=Object.create(null,Object.getOwnPropertyDescriptors(g.prototype)),d={make:function(){var t=void 0;return[g.make(function(n){t=n}),t]}},m={__proto__:null,entries:function(t){return Object.entries(t)},keys:function(t){return Object.keys(t)},values:function(t){return Object.values(t)}},_=Symbol.for("NOT_COMPUTED"),O={__proto__:null,encode:function(t,n){return JSON.stringify(t,function(t,n){if(null!=n)return"Option"===n.__boxed_type__?{__boxed_type__:"Option",tag:n.tag,value:n.value}:"Result"===n.__boxed_type__?{__boxed_type__:"Result",tag:n.value.tag,value:n.value.value}:"AsyncData"===n.__boxed_type__?{__boxed_type__:"AsyncData",tag:n.tag,value:n.value}:n},n)},decode:function(n){return JSON.parse(n,function(n,e){return null==e?e:"Option"===e.__boxed_type__?"Some"===e.tag?t.Some(e.value):t.None():"Result"===e.__boxed_type__?"Ok"===e.tag?f.Ok(e.value):f.Error(e.value):"AsyncData"===e.__boxed_type__?"NotAsked"===e.tag?i.NotAsked():"Loading"===e.tag?i.Loading():i.Done(e.value):e})}};exports.Array=o,exports.AsyncData=i,exports.Deferred=d,exports.Dict=m,exports.Future=g,exports.Lazy=function(t){var n={contents:_};return{get value(){return n.contents===_&&(n.contents=t()),n.contents}}},exports.Option=t,exports.Result=f,exports.Serializer=O;
//# sourceMappingURL=Boxed.js.map

@@ -26,13 +26,21 @@ import { Option } from "./Option";

Ok: <T>(x: T) => {
readonly tag: "Ok";
readonly value: T;
readonly value: {
readonly tag: "Ok";
readonly value: T;
};
};
Error: <T_1>(x: T_1) => {
readonly tag: "Error";
readonly error: T_1;
readonly value: {
readonly tag: "Error";
readonly value: T_1;
};
};
};
tag: "Ok" | "Error";
value: Ok | undefined;
error: Error | undefined;
value: {
tag: "Ok";
value: Ok;
} | {
tag: "Error";
value: Error;
};
constructor();

@@ -93,3 +101,5 @@ /**

tag: "Ok";
value: Ok;
value: {
value: Ok;
};
};

@@ -101,3 +111,5 @@ /**

tag: "Error";
error: Error;
value: {
value: Error;
};
};

@@ -104,0 +116,0 @@ /**

@@ -0,1 +1,13 @@

# 0.4.2
Fixes:
- Fixed a failing test (64feaff)
# 0.4.1
Fixes:
- Fixed a compatibility issue with ts-pattern (37337ed)
# 0.4.0

@@ -2,0 +14,0 @@

{
"name": "@swan-io/boxed",
"version": "0.4.0",
"version": "0.4.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Utility types for functional TypeScript",

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