@hellofiremind/map-keys-case

1.0.3 • Public • Published

Allows for quick conversion of maps/objects in JS to perform changes to all the keys.

toSnakeCase

import { toSnakeCase } from '@hellofiremind/map-keys-case'
// import toSnakeCase from '@hellofiremind/map-keys-case/to-camel-case'

toSnakeCase({
  hello_world: 'adsf',
  AndAgain: 'asjfh'
})

// { hello_world: 'adsf', and_again: 'asjfh' }

toCamelCase

import { toCamelCase } from '@hellofiremind/map-keys-case'
// import toCamelCase from '@hellofiremind/map-keys-case/to-camel-case'

toCamelCase({
  hello_world: 'adsf',
  AndAgain: 'asjfh'
})

// { helloWorld: 'adsf', andAgain: 'asjfh' }

Readme

Keywords

none

Package Sidebar

Install

npm i @hellofiremind/map-keys-case

Weekly Downloads

4

Version

1.0.3

License

ISC

Unpacked Size

9.71 kB

Total Files

12

Last publish

Collaborators

  • hellofiremindadmin