@budibase/shared-core 3.2.37 → 3.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/filters.d.ts CHANGED
@@ -96,5 +96,5 @@ export declare function sort<T extends Record<string, any>>(docs: T[], sort: key
96
96
  * @param docs the data
97
97
  * @param limit the number of docs to limit to
98
98
  */
99
- export declare function limit<T>(docs: T[], limit: string): T[];
99
+ export declare function limit<T>(docs: T[], limit: string | number): T[];
100
100
  export declare const hasFilters: (query?: SearchFilters) => boolean;
package/dist/index.js CHANGED
@@ -22698,7 +22698,7 @@ function sort(docs, sort2, sortOrder, sortType = "string" /* STRING */) {
22698
22698
  });
22699
22699
  }
22700
22700
  function limit(docs, limit2) {
22701
- const numLimit = parseFloat(limit2);
22701
+ const numLimit = typeof limit2 === "number" ? limit2 : parseFloat(limit2);
22702
22702
  if (isNaN(numLimit)) {
22703
22703
  return docs;
22704
22704
  }