@iadvize-oss/foldable-helpers
Advanced tools
Comparing version 0.0.1-beta.1-canary-67ed471b42e0af2d26c4cb59336878d9cdabe43f to 1.0.0-canary-db0bdb18f7263b3f8e2d4fef39bd44b5ff3648ba
@@ -10,7 +10,11 @@ # Changelog | ||
## [1.0.0] | ||
### Added | ||
- fold creators `createFold` and `createFoldObject` | ||
- helpers `combineGuards` and `not` to compose guards | ||
- fold creators `createFold` and `createFoldObject` | ||
- helpers `combineGuards` and `not` to compose guards | ||
[Unreleased]: https://github.com/iadvize/foldable-helpers-library/compare/v0.0.0...HEAD | ||
[Unreleased]: https://github.com/iadvize/foldable-helpers-library/compare/v1.0.0...HEAD | ||
[1.0.0]: https://github.com/iadvize/foldable-helpers-library/compare/v0.0.0...v1.0.0 |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),e=require("./Either-3229cd6e.js");exports.createFold=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return function(o){var u=e.zip(t,n);return e.pipe(u,e.findFirst((function(e){return(0,r.__read(e,1)[0])(o)})),e.fromOption((function(){return new Error("No guard found to fold "+o)})),e.fold((function(r){throw r}),(function(e){var t=r.__read(e,2);t[0];return(0,t[1])(o)})))}}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),e=require("./Either-a660b25b.js");exports.createFold=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return function(o){var u=e.zip(t,n);return e.pipe(u,e.findFirst((function(e){return(0,r.__read(e,1)[0])(o)})),e.fromOption((function(){return new Error("No guard found to fold "+o)})),e.fold((function(r){throw r}),(function(e){var t=r.__read(e,2);t[0];return(0,t[1])(o)})))}}}; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./Either-3229cd6e.js");exports.createFoldObject=function(e){return function(t){return function(n){var o=Object.keys(e);return r.pipe(o,r.findFirst((function(r){return e[r](n)})),r.fromOption((function(){return new Error("No guard found to fold "+n)})),r.fold((function(r){throw r}),(function(r){return t[r](n)})))}}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./Either-a660b25b.js");exports.createFoldObject=function(t){return function(e){return function(n){var o=Object.keys(t);return r.pipe(o,r.findFirst((function(r){return t[r](n)})),r.fromOption((function(){return new Error("No guard found to fold "+n)})),r.fold((function(r){throw r}),(function(r){return e[r](n)})))}}}; |
@@ -1,1 +0,1 @@ | ||
import{__read as r}from"tslib";import{z as n,p as t,f as o,a as u,b as f}from"./Either-2becd960.js";function e(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return function(i){var c=n(e,a);return t(c,u((function(n){return(0,r(n,1)[0])(i)})),o((function(){return new Error("No guard found to fold "+i)})),f((function(r){throw r}),(function(n){var t=r(n,2);t[0];return(0,t[1])(i)})))}}}export{e as createFold}; | ||
import{__read as r}from"tslib";import{z as n,p as t,f as o,a as u,b as f}from"./Either-c0269824.js";function a(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return function(i){var c=n(a,e);return t(c,u((function(n){return(0,r(n,1)[0])(i)})),o((function(){return new Error("No guard found to fold "+i)})),f((function(r){throw r}),(function(n){var t=r(n,2);t[0];return(0,t[1])(i)})))}}}export{a as createFold}; |
@@ -1,1 +0,1 @@ | ||
import{p as n,f as r,a as t,b as o}from"./Either-2becd960.js";function u(u){return function(e){return function(f){var c=Object.keys(u);return n(c,t((function(n){return u[n](f)})),r((function(){return new Error("No guard found to fold "+f)})),o((function(n){throw n}),(function(n){return e[n](f)})))}}}export{u as createFoldObject}; | ||
import{p as n,f as r,a as t,b as o}from"./Either-c0269824.js";function u(u){return function(e){return function(f){var c=Object.keys(u);return n(c,t((function(n){return u[n](f)})),r((function(){return new Error("No guard found to fold "+f)})),o((function(n){throw n}),(function(n){return e[n](f)})))}}}export{u as createFoldObject}; |
{ | ||
"name": "@iadvize-oss/foldable-helpers", | ||
"version": "0.0.1-beta.1-canary-67ed471b42e0af2d26c4cb59336878d9cdabe43f", | ||
"version": "1.0.0-canary-db0bdb18f7263b3f8e2d4fef39bd44b5ff3648ba", | ||
"description": "Typescript helpers to fold on sum types", | ||
@@ -53,4 +53,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"fp-ts": "^2.4.4" | ||
"fp-ts": "^2.5.0" | ||
} | ||
} |
35672
154
Updatedfp-ts@^2.5.0