1.0.3 • Published 4 years ago

@hellofiremind/map-keys-case v1.0.3

Weekly downloads
94
License
ISC
Repository
github
Last release
4 years ago

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