rubico
Version:
[a]synchronous functional programming
10 lines (8 loc) • 742 B
JavaScript
/**
* Rubico v2.8.2
* https://rubico.land/
*
* © Richard Yufei Tong, King of Software
* Rubico may be freely distributed under the CFOSS license.
*/
!function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.unless=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=>function(){return n})(u),l=((n,t)=>function(){return n(t)})(o,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?u:o(u);var f,c,i,l}}());