@fp51/foldable-helpers
Advanced tools
Comparing version 1.0.0-canary-416257c06108e5f2ff50b8a94f70f6fde0cb7548-1634091098502 to 1.0.0-canary-41ffeea549c27e72e6191028787df9033e964e4d-1640916600432
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),e=require("./pipeable-7181e6e6.js");exports.createFold=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];function o(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return function(o){var u=e.zip(n,t);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 n=r.__read(e,2);return n[0],(0,n[1])(o)})))}}return o}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),e=require("./pipeable-7181e6e6.js");exports.createFold=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];function o(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return function(o){var u=e.zip(n,t);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 ".concat(o))})),e.fold((function(r){throw r}),(function(e){var n=r.__read(e,2);return n[0],(0,n[1])(o)})))}}return o}; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./pipeable-7181e6e6.js");exports.createFoldObject=function(r){return function(t){return function(n){var o=Object.keys(r);return e.pipe(o,e.findFirst((function(e){return r[e](n)})),e.fromOption((function(){return new Error("No guard found to fold "+n)})),e.fold((function(e){throw e}),(function(e){return t[e](n)})))}}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./pipeable-7181e6e6.js");exports.createFoldObject=function(r){return function(t){return function(n){var o=Object.keys(r);return e.pipe(o,e.findFirst((function(e){return r[e](n)})),e.fromOption((function(){return new Error("No guard found to fold ".concat(n))})),e.fold((function(e){throw e}),(function(e){return t[e](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"./pipeable-6470c549.js";function a(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];function i(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return function(i){var c=n(a,e);return t(c,o((function(n){return(0,r(n,1)[0])(i)})),u((function(){return new Error("No guard found to fold "+i)})),f((function(r){throw r}),(function(n){var t=r(n,2);return t[0],(0,t[1])(i)})))}}return i}export{a 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"./pipeable-6470c549.js";function a(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];function i(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return function(i){var c=n(a,e);return t(c,o((function(n){return(0,r(n,1)[0])(i)})),u((function(){return new Error("No guard found to fold ".concat(i))})),f((function(r){throw r}),(function(n){var t=r(n,2);return t[0],(0,t[1])(i)})))}}return i}export{a as createFold}; |
@@ -1,1 +0,1 @@ | ||
import{p as n,f as r,a as t,b as o}from"./pipeable-6470c549.js";function u(u){return function(e){return function(f){var c=Object.keys(u);return n(c,r((function(n){return u[n](f)})),t((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"./pipeable-6470c549.js";function u(u){return function(e){return function(c){var f=Object.keys(u);return n(f,r((function(n){return u[n](c)})),t((function(){return new Error("No guard found to fold ".concat(c))})),o((function(n){throw n}),(function(n){return e[n](c)})))}}}export{u as createFoldObject}; |
{ | ||
"name": "@fp51/foldable-helpers", | ||
"version": "1.0.0-canary-416257c06108e5f2ff50b8a94f70f6fde0cb7548-1634091098502", | ||
"version": "1.0.0-canary-41ffeea549c27e72e6191028787df9033e964e4d-1640916600432", | ||
"description": "Typescript helpers to fold on sum types", | ||
@@ -43,5 +43,5 @@ "main": "dist/index.js", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"rollup-plugin-typescript2": "^0.31.0", | ||
"ts-jest": "^26.4.4", | ||
"tsd": "^0.17.0", | ||
"tsd": "^0.19.0", | ||
"tslib": "^2.1.0", | ||
@@ -48,0 +48,0 @@ "typedoc": "^0.22.3", |
17441