(arr: T[] | null | undefined, item: T)
| 5 | * @returns A new array containing all original items and the new item. |
| 6 | */ |
| 7 | export function addToArray<T>(arr: T[] | null | undefined, item: T): T[] { |
| 8 | return arr ? [...arr, item] : [item]; |
| 9 | } |
| 10 | |
| 11 | /** |
| 12 | * Adds or updates a key/value pair in an object immutably. |
nothing calls this directly
no outgoing calls
no test coverage detected