map-values-deep
Recursive lodash.mapKeys
Install
$ npm install lodash map-values-deep --save
Usage
const mapValuesDeep = require('map-values-deep')
const square = (value, key) => value * value
mapValuesDeep({ two: 2, obj: { three: 3, four: 4 }, arr: [5, 6] }, square)
// => { two: 4, obj: { three: 9, four: 16 }, arr: [25, 36] }
License
map-values-deep © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats