(value: string)
| 50 | } |
| 51 | |
| 52 | function getOrGenerateID(value: string): string { |
| 53 | let id = store[value]; |
| 54 | if (!id) { |
| 55 | id = `ID${++idIdx}`; |
| 56 | store[value] = id; |
| 57 | } |
| 58 | return id; |
| 59 | } |
| 60 | |
| 61 | findAndReplaceID(removedObj); |
| 62 | return { cleanedObject: removedObj, idStore: store }; |