autocomplete-highlighters-debug.js revision 4ac019c294a20815698447dc86bd703b3f622c41
/**
* Provides pre-built result highlighters for AutoComplete.
*
* @module autocomplete
* @submodule autocomplete-highlighters
* @class AutoCompleteHighlighters
* @static
*/
var YArray = Y.Array,
// -- Public Methods -------------------------------------------------------
/**
* Highlights any individual query character that occurs anywhere in a
* result. Case-insensitive.
*
* @method charMatch
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
// The caseSensitive parameter is only intended for use by
// charMatchCase(). It's intentionally undocumented.
});
});
},
/**
* Case-sensitive version of <code>charMatch()</code>.
*
* @method charMatchCase
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
},
/**
* Highlights the complete query as a phrase anywhere within a result.
* Case-insensitive.
*
* @method phraseMatch
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
// The caseSensitive parameter is only intended for use by
// phraseMatchCase(). It's intentionally undocumented.
});
});
},
/**
* Case-sensitive version of <code>phraseMatch()</code>.
*
* @method phraseMatchCase
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
},
/**
* Highlights the complete query as a phrase at the beginning of a result.
* Case-insensitive.
*
* @method startsWith
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
// The caseSensitive parameter is only intended for use by
// startsWithCase(). It's intentionally undocumented.
startsWith : true
});
});
},
/**
* Case-sensitive version of <code>startsWith()</code>.
*
* @method startsWithCase
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
},
/**
* Highlights portions of results in which words from 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.
*
* @method subWordMatch
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
// The caseSensitive parameter is only intended for use by
// subWordMatchCase(). It's intentionally undocumented.
});
});
});
},
/**
* Case-sensitive version of <code>subWordMatch()</code>.
*
* @method subWordMatchCase
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
},
/**
* Highlights individual words in results that are also in the query.
* Non-word characters like punctuation are ignored. Case-insensitive.
*
* @method wordMatch
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
// The caseSensitive parameter is only intended for use by
// wordMatchCase(). It's intentionally undocumented.
});
});
},
/**
* Case-sensitive version of <code>wordMatch()</code>.
*
* @method wordMatchCase
* @param {String} query Query to match
* @param {Array} results Results to highlight
* @return {Array} Highlighted results
* @static
*/
}
});