client/js/libs/jquery/tabcomplete.js
function match(word, array, caseSensitive) {
		return $.grep(
			array,
			function(w) {
				if (caseSensitive) {
					return !w.indexOf(word);
				} else {
					return !w.toLowerCase().indexOf(word.toLowerCase());
				}
			}
		);
	}
function match(word, array, caseSensitive) {
		return $.grep(
			array,
			function(w) {
				if (caseSensitive) {
					return !w.indexOf(word);
				} else {
					return !w.toLowerCase().indexOf(word.toLowerCase());
				}
			}
		);
	}
function match ( word , array , caseSensitive ) { return $ . grep ( array , function ( w ) { if ( caseSensitive ) { return ! w . indexOf ( word ) ; } else { return ! w . toLowerCase ( ) . indexOf ( word . toLowerCase ( ) ) ; } } ) ; }
Simple matching. Filter the array and return the items that begins with 'word'.
Simple matching . Filter the array and return the items that begins with word .