From 4fe11342d049f708c3416e5b29fa3ed5bfc3b393 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 21 Jan 2012 21:46:47 -0800 Subject: [PATCH] make case lookahead case insensitive --- js/bootstrap-typeahead.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index b4957c3f61..16539fefbf 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -35,7 +35,8 @@ constructor: Typeahead , matcher: function (item, query) { - return ~item.indexOf(query) + // ;_; http://jsperf.com/asdfdfasdfa + return ~item.toLowerCase().indexOf(query.toLowerCase()) } , select: function () {