src/includes/suggestions.js
function (response) {
        var that = this,
            suggestions;

        if (!response || !$.isArray(response.suggestions)) {
            return false;
        }

        that.verifySuggestionsFormat(response.suggestions);
        that.setUnrestrictedValues(response.suggestions);

        if ($.isFunction(that.options.onSuggestionsFetch)) {
            suggestions = that.options.onSuggestionsFetch.call(that.element, response.suggestions);
            if ($.isArray(suggestions)) {
                response.suggestions = suggestions;
            }
        }

        return true;
    }
function (response) {
        var that = this,
            suggestions;

        if (!response || !$.isArray(response.suggestions)) {
            return false;
        }

        that.verifySuggestionsFormat(response.suggestions);
        that.setUnrestrictedValues(response.suggestions);

        if ($.isFunction(that.options.onSuggestionsFetch)) {
            suggestions = that.options.onSuggestionsFetch.call(that.element, response.suggestions);
            if ($.isArray(suggestions)) {
                response.suggestions = suggestions;
            }
        }

        return true;
    }
function ( response ) { var that = this , suggestions ; if ( ! response || ! $ . isArray ( response . suggestions ) ) { return false ; } that . verifySuggestionsFormat ( response . suggestions ) ; that . setUnrestrictedValues ( response . suggestions ) ; if ( $ . isFunction ( that . options . onSuggestionsFetch ) ) { suggestions = that . options . onSuggestionsFetch . call ( that . element , response . suggestions ) ; if ( $ . isArray ( suggestions ) ) { response . suggestions = suggestions ; } } return true ; }
Checks response format and data
@return {Boolean} response contains acceptable data
Checks response format and data