autocomplete-filters-debug.js revision 4bc090583f2a5d4fee80ca7a79a993d4e5ac14ec
/**
Provides pre-built result matching filters for AutoComplete.
@module autocomplete
@submodule autocomplete-filters
@class AutoCompleteFilters
@static
**/
var YArray = Y.Array,
YObject = Y.Object,
// -- Public Methods -------------------------------------------------------
/**
Returns an array of results that contain all of the characters in the query,
in any order (not necessarily consecutive). Case-insensitive.
@method charMatch
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
// The caseSensitive parameter is only intended for use by
// charMatchCase(). It's intentionally undocumented.
if (!caseSensitive) {
}
});
});
},
/**
Case-sensitive version of `charMatch()`.
@method charMatchCase
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
},
/**
Returns an array of results that contain the complete query as a phrase.
Case-insensitive.
@method phraseMatch
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
// The caseSensitive parameter is only intended for use by
// phraseMatchCase(). It's intentionally undocumented.
if (!caseSensitive) {
}
});
},
/**
Case-sensitive version of `phraseMatch()`.
@method phraseMatchCase
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
},
/**
Returns an array of results that start with the complete query as a phrase.
Case-insensitive.
@method startsWith
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
// The caseSensitive parameter is only intended for use by
// startsWithCase(). It's intentionally undocumented.
if (!caseSensitive) {
}
});
},
/**
Case-sensitive version of `startsWith()`.
@method startsWithCase
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
},
/**
Returns an array of results in which all the words of the query match either
whole words or parts of words in the result. Non-word characters like
whitespace and certain punctuation are ignored. Case-insensitive.
This is basically a combination of `wordMatch()` (by ignoring whitespace and
word order) and `phraseMatch()` (by allowing partial matching instead of
requiring the entire word to match).
Example use case: Trying to find personal names independently of name order
(Western or Eastern order) and supporting immediate feedback by allowing
partial occurences. So queries like "J. Doe", "Doe, John", and "J. D." would
all match "John Doe".
@method subWordMatch
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
// The caseSensitive parameter is only intended for use by
// subWordMatchCase(). It's intentionally undocumented.
});
});
});
},
/**
Case-sensitive version of `subWordMatch()`.
@method subWordMatchCase
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
},
/**
Returns an array of results that contain all of the words in the query, in
any order. Non-word characters like whitespace and certain punctuation are
ignored. Case-insensitive.
@method wordMatch
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
// The caseSensitive parameter is only intended for use by
// wordMatchCase(). It's intentionally undocumented.
// Convert resultWords array to a hash for fast lookup.
options));
});
});
},
/**
Case-sensitive version of `wordMatch()`.
@method wordMatchCase
@param {String} query Query to match
@param {Array} results Results to filter
@return {Array} Filtered results
@static
**/
}
});