UNPKG

typescript-immutable-utils

Version:

Type-safe immutability helpers for simple objects and arrays

10 lines (9 loc) 290 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function mapValues(src, map) { return new Map(Array.from(src.entries(), function (_a) { var key = _a[0], value = _a[1]; return [key, map(value, key)]; })); } exports.mapValues = mapValues;