template/static/scripts/bootstrap-typeahead.js
function (event) {
            var that = this,
                items;

            if (that.ajax) {
                that.ajaxer();
            }
            else {
                that.query = that.$element.val();

                if (!that.query) {
                    return that.shown ? that.hide() : that;
                }
                
                items = that.grepper(that.source);
                
                if (!items || !items.length) {
                    return that.shown ? that.hide() : that;
                }

                return that.render(items.slice(0, that.options.items)).show();
            }
        }
function (event) {
            var that = this,
                items;

            if (that.ajax) {
                that.ajaxer();
            }
            else {
                that.query = that.$element.val();

                if (!that.query) {
                    return that.shown ? that.hide() : that;
                }
                
                items = that.grepper(that.source);
                
                if (!items || !items.length) {
                    return that.shown ? that.hide() : that;
                }

                return that.render(items.slice(0, that.options.items)).show();
            }
        }
function ( event ) { var that = this , items ; if ( that . ajax ) { that . ajaxer ( ) ; } else { that . query = that . $element . val ( ) ; if ( ! that . query ) { return that . shown ? that . hide ( ) : that ; } items = that . grepper ( that . source ) ; if ( ! items || ! items . length ) { return that . shown ? that . hide ( ) : that ; } return that . render ( items . slice ( 0 , that . options . items ) ) . show ( ) ; } }
------------------------------------------------------------------  Search source
------------------------------------------------------------------ Search source