Package detail

just-deep-map-values

angus-c17.3kMIT1.2.0

Returns an object with values at all depths mapped according to the provided function

object, deep, map, values

readme

just-deep-map-values

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-deep-map-values
yarn add just-deep-map-values

Returns an object with values at all depths mapped according to the provided function

import deepMapValues from 'just-deep-map-values';

const squareFn = (number) => number * number;
deepMapValues({ a: 1, b: { c: 2, d: { e: 3 } } }, squareFn); // => { a: 1, b: { c: 4, d: { e: 9 } } }

changelog

just-deep-map-values

1.2.0

Minor Changes

  • Rename node module .js -> .cjs

1.1.1

Patch Changes

  • fix: reorder exports to set default last #488

1.1.0

Minor Changes

  • package.json updates to fix #467 and #483