( obj: Record<string, any>, )
| 165 | } |
| 166 | |
| 167 | export function normalizeObjectKeys( |
| 168 | obj: Record<string, any>, |
| 169 | ): Record<string, any> { |
| 170 | if (_.isObject(obj) && !_.isArray(obj)) { |
| 171 | return _.transform( |
| 172 | obj, |
| 173 | (result, value, key) => { |
| 174 | const newKey = `${key}`.replace(OBJECT_NUMERIC_KEY_PREFIX, ""); |
| 175 | result[newKey] = |
| 176 | _.isObject(value) && !_.isDate(value) |
| 177 | ? normalizeObjectKeys(value) |
| 178 | : value; |
| 179 | }, |
| 180 | {} as Record<string, any>, |
| 181 | ); |
| 182 | } else { |
| 183 | return obj; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | function flattenHints( |
| 188 | obj: Record<string, any>, |
no outgoing calls
no test coverage detected
searching dependent graphs…