react-bootstrap-typeahead
Version:
React typeahead with Bootstrap styling
16 lines (15 loc) • 418 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
/**
* Truncates the result set based on `maxResults` and returns the new set.
*/
function getTruncatedOptions(options, maxResults) {
if (!maxResults || maxResults >= options.length) {
return options;
}
return options.slice(0, maxResults);
}
var _default = exports["default"] = getTruncatedOptions;
;