Typeahead.js: What exactly is Bloodhound.tokenizers.whitespace?

Created on 24 Nov 2014  路  2Comments  路  Source: twitter/typeahead.js

I am trying to understand how to use Bloodhound but the documentation feels incomplete. What exactly is the "Bloodhound.tokenizers.whitespace"? Can/should I write my own tokenizer function? Are there other options? how does it compare to a simple substring matcher?

Most helpful comment

Here's a better explanation of tokenization: https://github.com/twitter/typeahead.js/blob/master/doc/migration/0.10.0.md#tokenization-methods-must-be-provided

All 2 comments

I think it just normalizes the query and data source by stripping whitespace. So if the data was "war rabbit" and you typed "warrab" then it would be able to match.

Here's a better explanation of tokenization: https://github.com/twitter/typeahead.js/blob/master/doc/migration/0.10.0.md#tokenization-methods-must-be-provided

Was this page helpful?
0 / 5 - 0 ratings