object-key-converter
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

object-case-converter

decamelize

const object = {
  one: 1,
  twoThree: 23,
  fourFiveSix: {
    four: 4,
    fiVe: 5,
    sixSeven: 67,
  }
}

const res = decamelize(object)
/*
{
  one: 1,
  two_three: 23,
  four_five_six: { four: 4, fi_ve: 5, six_seven: 67 }
}
*/

camelize

const object = {
  one: 1,
  two_three: 23,
  four_five_six: { four: 4, five: 5, six_seven: 67 }
}

const res = camelize(object)
/*
{
  one: 1,
  twoThree: 23,
  fourFiveSix: { four: 4, fiVe: 5, sixSeven: 67 }
}
*/

Package Sidebar

Install

npm i object-key-converter

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

2.53 kB

Total Files

4

Last publish

Collaborators

  • eomttt