(obj: unknown)
| 5 | export type Indent = string | null | undefined; |
| 6 | |
| 7 | function stringify(obj: unknown): string { |
| 8 | return (JSON.stringify(obj) || 'undefined').replace( |
| 9 | /[\u2028\u2029]/g, |
| 10 | (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}` |
| 11 | ); |
| 12 | } |
| 13 | |
| 14 | function serializeArray<T>(arr: T[], indent: Indent, baseIndent: string): string { |
| 15 | let output = '['; |
no outgoing calls
no test coverage detected