Swap-Aggregator-Subgraph/node_modules/looper/index.js
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

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)
})()
}