Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/nodejs/function-loop/ drwxr-xr-x | |
| Viewing file: Select action/file-type: module.exports = loop
// this weird little engine is to loop if the cb's keep getting
// called synchronously, since that's faster and makes shallower
// stack traces, but recurse if any of them don't fire this tick
function loop (self, arr, cb, onerr, i) {
if (!i)
i = 0
var running = false
while (i < arr.length && !running) {
running = true
var sync = true
try {
var ret = arr[i].call(self, next)
} catch (er) {
return onerr.call(self,er)
}
if (ret && typeof ret.then === 'function')
ret.then(next.bind(self, null), onerr.bind(self))
i++
sync = false
}
function next (er) {
if (er)
return onerr.call(self, er)
else if (!sync)
return loop(self, arr, cb, onerr, i)
running = false
}
if (i >= arr.length && !running)
return cb.call(self)
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0036 ]-- |