(value: unknown)
| 199 | * This is used for creating string keys in groupBy operations. |
| 200 | */ |
| 201 | export function serializeValue(value: unknown): string { |
| 202 | return JSON.stringify(value, (_, val) => { |
| 203 | if (typeof val === 'bigint') { |
| 204 | return val.toString() |
| 205 | } |
| 206 | if (val instanceof Date) { |
| 207 | return val.toISOString() |
| 208 | } |
| 209 | return val |
| 210 | }) |
| 211 | } |
no test coverage detected