(obj: Record<string, unknown> | undefined, counter: Map<string, number>)
| 53 | } |
| 54 | |
| 55 | function cleanOrderObject(obj: Record<string, unknown> | undefined, counter: Map<string, number>): boolean { |
| 56 | if (!obj) return false |
| 57 | let dirty = false |
| 58 | for (const field of PRICE_FIELDS) { |
| 59 | if (field in obj && isLegacySentinel(obj[field])) { |
| 60 | delete obj[field] |
| 61 | counter.set(field, (counter.get(field) ?? 0) + 1) |
| 62 | dirty = true |
| 63 | } |
| 64 | } |
| 65 | return dirty |
| 66 | } |
| 67 | |
| 68 | function cleanFile(path: string): { dirty: boolean; counts: Map<string, number> } { |
| 69 | const counts = new Map<string, number>() |
no test coverage detected