UNPKG

rubico

Version:

[a]synchronous functional programming

9 lines (7 loc) 743 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.when=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=(n,t,e)=>n?t():e();return(e,o)=>function(u){const r=e(u);return(n=>null!=n&&"function"==typeof n.then)(r)?r.then((f=t,c=n,i=((n,t)=>function(){return n(t)})(o,u),l=(n=>function(){return n})(u),c==n?((n,t,e)=>function(o){return n(o,t,e)})(f,i,l):i==n?((n,t,e)=>function(o){return n(t,o,e)})(f,c,l):((n,t,e)=>function(o){return n(t,e,o)})(f,c,i))):r?o(u):u;var f,c,i,l}}());