UNPKG

typescript-immutable-utils

Version:

Type-safe immutability helpers for simple objects and arrays

11 lines (10 loc) 346 B
export * from './arrays'; export * from './objects'; export * from './dicts'; import { mapValues as mapDictValues } from './dicts'; import { mapValues as mapMapValues } from './maps'; export function mapValues(dictOrMap, map) { return dictOrMap instanceof Map ? mapMapValues(dictOrMap, map) : mapDictValues(dictOrMap, map); }