rubico
Version:
[a]synchronous functional programming
9 lines (7 loc) • 745 B
JavaScript
/**
* 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.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}}());