You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
391 B

var looper = module.exports = function (fun) {
return function next (a, b, c) {
var loop = true, returned = false, sync = false
do {
sync = true; loop = false
fun.call(function (x, y, z) {
if(sync) {
a = x; b = y; c = z
loop = true
}
else
next(x, y, z)
}, a, b, c)
sync = false
} while(loop)
}
}