Implement function callbacks for item matching.

This commit is contained in:
Jürg Lehni 2013-10-19 12:38:36 +02:00
parent 4fb6a5d949
commit 1a645a1adb

View file

@ -1273,6 +1273,9 @@ var Item = Base.extend(Callback, /** @lends Item# */{
if (compare instanceof RegExp) {
if (!compare.test(value))
return false;
} else if (typeof compare === 'function') {
if (!compare(value))
return false;
} else if (Base.isPlainObject(compare)) {
if (!matchObject(compare, value))
return false;