( collection: T[], callback: (item: T, obj: Record<string, P>) => void )
| 6 | } |
| 7 | |
| 8 | export function eachWithObject<T, P>( |
| 9 | collection: T[], |
| 10 | callback: (item: T, obj: Record<string, P>) => void |
| 11 | ): Record<string, P> { |
| 12 | const obj: Record<string, P> = {}; |
| 13 | collection.forEach((item) => { |
| 14 | callback(item, obj); |
| 15 | }); |
| 16 | return obj; |
| 17 | } |
| 18 | |
| 19 | export function hasData(row: Record<string, any>) { |
| 20 | const data = { ...row }; |
no outgoing calls
no test coverage detected