(items: Array<T>, item: T, max = 0)
| 607 | * @returns A new array with `item` added. |
| 608 | */ |
| 609 | export function addToStart<T>(items: Array<T>, item: T, max = 0): Array<T> { |
| 610 | const newItems = [item, ...items] |
| 611 | return max && newItems.length > max ? newItems.slice(0, max) : newItems |
| 612 | } |
| 613 | |
| 614 | /** |
| 615 | * Sentinel value that can be passed as a query's `queryFn` to conditionally disable the query (equivalent |
no outgoing calls
no test coverage detected