mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
15 lines
306 B
JavaScript
15 lines
306 B
JavaScript
|
|
var looper = module.exports = function (fun) {
|
|
(function next () {
|
|
var loop = true, returned = false, sync = false
|
|
do {
|
|
sync = true; loop = false
|
|
fun.call(this, function () {
|
|
if(sync) loop = true
|
|
else next()
|
|
})
|
|
sync = false
|
|
} while(loop)
|
|
})()
|
|
}
|