UNPKG

rubico

Version:

[a]synchronous functional programming

9 lines (7 loc) 879 B
/** * rubico v2.6.2 * https://github.com/a-synchronous/rubico * (c) 2019-2024 Richard Tong * rubico may be freely distributed under the MIT license. */ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.isIn=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";Array.isArray;const n=Symbol.for("placeholder"),t=function(n,t){return null!=t&&(t.constructor==Set?t.has(n):t.constructor==Map?Array.from(t.values()).includes(n):(n=>function(t){return null!=t&&("function"==typeof t.includes?t.includes(n):t.constructor==Object&&function(n,t){for(const e in n)if((r=t)===(o=n[e])||r!=r&&o!=o)return!0;var r,o;return!1}(t,n))})(n)(t))};return(...r)=>{const o=r.pop();return r.length>0?t(r[0],o):(e=t,c=o,(u=n)==n?((n,t)=>function(r){return n(r,t)})(e,c):((n,t)=>function(r){return n(t,r)})(e,u));var e,u,c}}());