(input: unknown, depth: number = 100, maxProperties: number = +Infinity)
| 53 | */ |
| 54 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 55 | export function normalize(input: unknown, depth: number = 100, maxProperties: number = +Infinity): any { |
| 56 | try { |
| 57 | // since we're at the outermost level, we don't provide a key |
| 58 | return visit('', input, depth, maxProperties); |
| 59 | } catch (err) { |
| 60 | return { ERROR: `**non-serializable** (${err})` }; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | /** JSDoc */ |
| 65 | export function normalizeToSize<T>( |
no test coverage detected