MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / cleanOrderObject

Function cleanOrderObject

scripts/migrate-order-sentinels.ts:55–66  ·  view source on GitHub ↗
(obj: Record<string, unknown> | undefined, counter: Map<string, number>)

Source from the content-addressed store, hash-verified

53}
54
55function 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
68function cleanFile(path: string): { dirty: boolean; counts: Map<string, number> } {
69 const counts = new Map<string, number>()

Callers 1

cleanFileFunction · 0.85

Calls 3

isLegacySentinelFunction · 0.85
setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected