ixfx
Version:
Bundle of ixfx libraries
1 lines • 1.15 kB
JavaScript
import{n as e}from"./chunk-BKBlUVio.js";import{a as t,i as n,n as r,o as i,r as a,t as o}from"./basic-uUF48DoN.js";var s=class extends Error{constructor(e){super(e),this.name=`CancelError`}};function c(...e){return t=>{let n=t;for(let t of e)try{n=t(n)}catch(e){if(e instanceof s)break;throw e}return n}}function l(e){return t=>t===void 0?t:e(t)}function u(){return e=>{if(e===void 0)throw new s(`cancel`);return e}}function d(e){return t=>t===void 0?e():t}const f=(e,t)=>e===t,p=e=>typeof e==`string`?e:JSON.stringify(e);function m(e){e===void 0&&(e=f);let t;return e=>{if(e!==t)return t=e,e}}function h(e){let t=[];return e===void 0&&(e=f),n=>{if(n!==void 0){for(let r of t)if(e(r,n))return;return t.push(n),n}}}function g(e){let t=new Set;return e===void 0&&(e=p),n=>{if(n===void 0)return;let r=e(n);if(!t.has(r))return t.add(r),n}}var _=e({CancelError:()=>s,average:()=>o,cancelIfUndefined:()=>u,flow:()=>c,ifNotUndefined:()=>l,ifUndefined:()=>d,max:()=>r,min:()=>a,rank:()=>n,seenLastToUndefined:()=>m,seenToUndefined:()=>h,seenToUndefinedByKey:()=>g,sum:()=>t,tally:()=>i});export{u as a,c,g as i,s as l,m as n,l as o,h as r,d as s,_ as t};