twitter/bootstrap — pull request #3104 by iamnirav (2012-04-17 00:11:46+00:00)
Title: Allow updater function in bootstrap-typeahead.js (updates the value of the input field) to be overridden

This update separates out the code that updates the input field once a user selects a typeahead item. It also adds in an option for a developer to override this function. This means you can specify something like

```js
var updater = function (item) {
var tokens = this.query.split(' ');

// Replace last (incomplete) token with completed selection
tokens.splice(-1, 1, item + ' ');

return tokens.join(' ');
}
```

to have a typeahead where you can string together a chain of autocompleted tokens.