(data: unknown, custom?: Stringifiers)
| 44 | * serialized only once. |
| 45 | */ |
| 46 | export function stringify(data: unknown, custom?: Stringifiers): string { |
| 47 | const out: string[] = []; |
| 48 | const indexes = new Map<unknown, number>(); |
| 49 | const res = serializeInner(out, indexes, data, custom); |
| 50 | if (res < 0) { |
| 51 | return String(res); |
| 52 | } |
| 53 | return `[${out.join(",")}]`; |
| 54 | } |
| 55 | |
| 56 | function serializeInner( |
| 57 | out: string[], |
no test coverage detected