( map: IdMap<MapValue> | undefined, mapValue?: (mapValue: MapValue) => MapValue, )
| 128 | ); |
| 129 | |
| 130 | export const mapClone = <MapValue>( |
| 131 | map: IdMap<MapValue> | undefined, |
| 132 | mapValue?: (mapValue: MapValue) => MapValue, |
| 133 | ): IdMap<MapValue> => { |
| 134 | const map2: IdMap<MapValue> = mapNew(); |
| 135 | collForEach(map, (value, key) => map2.set(key, mapValue?.(value) ?? value)); |
| 136 | return map2; |
| 137 | }; |
| 138 | |
| 139 | export const mapClone2 = <MapValue>(map: IdMap2<MapValue> | undefined) => |
| 140 | mapClone(map, mapClone); |
no test coverage detected
searching dependent graphs…