UNPKG

ixfx

Version:

Bundle of ixfx libraries

1 lines 833 B
const e=()=>{let e=-(2**53-1);return t=>{let n=Array.isArray(t)?t:[t];for(let t of n){if(typeof t!=`number`)break;e=Math.max(t,e)}return e}},t=()=>{let e=2**53-1;return t=>{let n=Array.isArray(t)?t:[t];for(let t of n){if(typeof t!=`number`)break;e=Math.min(t,e)}return e}},n=()=>{let e=0;return t=>{let n=Array.isArray(t)?t:[t];for(let t of n)typeof t==`number`&&(e+=t);return e}},r=()=>{let e=0,t=0;return n=>{let r=Array.isArray(n)?n:[n];for(let n of r)typeof n==`number`&&(t++,e+=n);return e/t}},i=e=>{let t=0;return n=>(e&&Array.isArray(n)?t+=n.length:t++,t)};function a(e,t={}){let n=t.includeType,r=t.emitEqualRanked??!1,i=t.emitRepeatHighest??!1,a;return t=>{if(!(n&&typeof t!==n)){if(a===void 0)return a=t,a;{let n=e(t,a);if(n==`a`)return a=t,a;if(n===`eq`&&r||i)return a}}}}export{n as a,a as i,e as n,i as o,t as r,r as t};