(map)
| 199 | * @returns { [key: string]: unknown } |
| 200 | */ |
| 201 | export function toObject (map) { |
| 202 | if (map instanceof ObjectWrappingMap) { |
| 203 | return map.wrappedObject |
| 204 | } |
| 205 | const object = {} |
| 206 | for (const key of map.keys()) { |
| 207 | const value = map.get(key) |
| 208 | setSafeProperty(object, key, value) |
| 209 | } |
| 210 | return object |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * Copies the contents of key-value pairs from each `objects` in to `map`. |
searching dependent graphs…