UNPKG

@codibre/fluent-iterable

Version:

Provides LINQ-like fluent api operations for iterables and async iterables (ES2018+).

14 lines (13 loc) 512 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.transformObjValues = transformObjValues; const to_object_1 = require("./sync/to-object"); const utils_1 = require("./utils"); /** * Applies a transformation to the value of all pro * @param obj The object to be iterated with * @param mapper the mapper to be applied to each value */ function transformObjValues(obj, mapper) { return to_object_1.toObject.call((0, utils_1.iterateObjEntries)(obj), ([p]) => p, mapper); }