(input: any)
| 1 | export function clean(input: any): any { |
| 2 | return Object.entries(input).reduce((output, [key, value]) => { |
| 3 | if (value) { |
| 4 | // @ts-ignore |
| 5 | output[key] = value; |
| 6 | } |
| 7 | return output; |
| 8 | }, {}); |
| 9 | } |
| 10 | |
| 11 | export const toObject = <T extends Record<string, any>, K extends keyof T>( |
| 12 | arr: T[], |