cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-04-14 02:15:25 +03:00
parent 40b40a69a5
commit 5073096601

View File

@ -74,15 +74,15 @@ function(that, name, callback){
do { do {
if(that.hasOwnProperty(name)){ if(that.hasOwnProperty(name)){
res.push(that) res.push(that)
// handle callback...
stop = callback stop = callback
&& callback(that) && callback(that)
// callback requested a stop... // stop requested by callback...
if(stop === false || stop == 'stop'){ if(stop === false || stop == 'stop'){
return that return that
} }
} }
that = that.__proto__ that = that.__proto__
// XXX revise...
} while(that !== null) } while(that !== null)
return res return res
} }