-
Notifications
You must be signed in to change notification settings - Fork 0
/
fig.require.min.js
1 lines (1 loc) · 1.11 KB
/
fig.require.min.js
1
caterwaul.tconfiguration('std seq continuation','fig.require.nodejs',function (){this.method('figment_require',fn[files,cc][cc(seq[ ~files.split(/\s+/)*[fs.readFileSync(_,'utf8')]].slice())])},{fs:typeof require==='undefined'||require('fs')}).tconfiguration('std seq continuation','fig.require.ajax',function (){this.method('figment_require',fn[files,cc][l*[file_list=seq[ ~files.split(/\s+/)],contents={},requests_left=file_list.size(),got_everything()=cc(seq[file_list*[contents[_]]]),receive(filename)(data)= --requests_left/se[contents[filename]=data,_||got_everything()]] in seq[file_list* ![get(_,receive(_))]]]),where*[create_xhr()=window.XMLHttpRequest/re[_?new _():new ActiveXObject('Microsoft.XMLHTTP')],get(url,success)=create_xhr()/se[_.open('GET',url,true),_.send(),_.onreadystatechange()=_.readyState===4&&success(_.responseText)]]}).tconfiguration('std seq continuation','fig.require',function (){this.configure(typeof window==='undefined'?'fig.require.nodejs':'fig.require.ajax').method('require',fn[modules,cc][this.figment_require(modules,_)/cpb[seq[ ~_* ![c(_,{'this':c})]],cc&&cc.call(c),where[c=this.clone()]]])});