UNPKG

431 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports["default"] = void 0;
7
8/**
9 * Truncates the result set based on `maxResults` and returns the new set.
10 */
11function getTruncatedOptions(options, maxResults) {
12 if (!maxResults || maxResults >= options.length) {
13 return options;
14 }
15
16 return options.slice(0, maxResults);
17}
18
19var _default = getTruncatedOptions;
20exports["default"] = _default;
\No newline at end of file