Javascript zepto功能不是什么';选择项

Javascript zepto功能不是什么';选择项,javascript,zepto,Javascript,Zepto,当我阅读zepto的源代码时,我发现有一点我不明白 例如: “not”函数:selector.item是什么? 有人说 IsFunction(selector.item)用于排除数组的选择器。 但如何排除?为什么要排除 这是源代码: else { var excludes = typeof selector == 'string' ? this.filter(selector) : (likeArray(selector) && isFunction(se

当我阅读zepto的源代码时,我发现有一点我不明白

例如: “not”函数:selector.item是什么? 有人说 IsFunction(selector.item)用于排除数组的选择器。 但如何排除?为什么要排除

这是源代码:

else {
    var excludes = typeof selector == 'string' ? this.filter(selector) :
        (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)

    this.forEach(function(el){
        if (excludes.indexOf(el) < 0) nodes.push(el)
    })
}
else{
var excludes=typeof selector==“string”?此.filter(选择器):
(比如array(选择器)和&isFunction(选择器.item))?slice.call(选择器):$(选择器)
this.forEach(函数(el){
if(排除.indexOf(el)<0)节点.push(el)
})
}

我最近也阅读了zepto源代码,我从MDN中找到了答案,那就是排除HTMLCollection。因为HTMLCollection类似于数组,并且具有方法
。这里有一个文档

包含一个指向答案的链接不是一个好的链接。请看这个。