Changes typeahead lookup function

I believe this will make it posible for the one-liner mentioned on the following comment to work.

https://github.com/twitter/bootstrap/pull/3941#issuecomment-7166157