@yangcurve/case
v1.0.11
Published
TypeScript case converter
Downloads
1,983
Maintainers
Readme
case
TypeScript case converter
Usage
import { to } from '@yangcurve/case'
to.camel
to.kebab
to.pascal
to.snake
to.upperKebab
to.upperSnake
const snake = to.snake('helloWorld')
type Snake = to.Snake<'helloWorld'>
const snakeObject = to.snake({
arrayOfNumbers: [1, 2, 3],
arrayOfObjects: [
{
helloWorld: 'hi',
},
{
itWorks: 'great',
},
],
nestedObject: {
a1: {
a2: new Map(),
},
b1: {
b2: new Set(),
},
},
})