JSPM

map-keys-deep

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 97
  • Score
    100M100P100Q89392F
  • License MIT

🔑 Maps object keys recursively

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

Build Status Coverage Status

🔑 Maps object keys recursively, like mapKeys by Lodash but recursive.

Usage

Install

yarn add map-keys-deep

Simple 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 jest

License

MIT