Package Exports
- map-keys-deep
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (map-keys-deep) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
map-keys-deep
🔑 Maps object keys recursively, like mapKeys by Lodash but recursive.
Usage
Install
yarn add map-keys-deepSimple sample usage
import mapKeysDeep from 'map-keys-deep';
mapKeysDeep({ Hello: { World: true } }, keys => keys.toLowerCase());
// { hello: { world: true } }FP style
import { camelCase } from 'lodash/fp';
import mapKeysDeep from 'map-keys-deep/fp';
mapKeysDeep(camelCase)({ hello_world: { bye_world: true } });
// { helloWorld: { byeWorld: true } }
mapKeysDeep(keys => keys.toLowerCase())({ Hello: { World: true } });
// { hello: { world: true } }Test
yarn jestLicense
MIT