just-deep-map-values
Returns an object with values at all depths mapped according to the provided function
Last updated 2 years ago by angus-c .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install just-deep-map-values 
SYNC missed versions from official npm registry.

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 } } }

Current Tags

  • 1.2.0                                ...           latest (2 years ago)

4 Versions

  • 1.2.0                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE