minor tweaks, still reevaluating .search(..)...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-04-30 03:37:06 +03:00
parent a80f3ad69a
commit 0e21955601

View File

@ -943,7 +943,7 @@ var BaseBrowserPrototype = {
return path.length > 0 return path.length > 0
&& pattern.length == path.length && pattern.length == path.length
&& !pattern.reduce(function(res, e, i){ && !pattern.reduce(function(res, e, i){
return res || (e != '*' && e != path[i]) }, false) } return res || !(e == '*' || e == path[i]) }, false) }
// index... // index...
: function(elem, i, path){ : function(elem, i, path){
return elem return elem
@ -953,7 +953,8 @@ var BaseBrowserPrototype = {
return this.walk( return this.walk(
function(i, path, elem, doNested){ function(i, path, elem, doNested){
if(elem && func.call(this, elem, i, path)){ if(elem && func.call(this, elem, i, path)){
return [elem] // XXX is this the right output format???
return [[elem, i, path]]
} }
return [] return []
}, },