@kamicane/camelize
v1.0.0
Published
camelize & hyphenate
Downloads
6
Maintainers
Readme
camelize
stupid simple camelize implementation, dates back to the mootools era
const { camelize, hyphenate } = require('@kamicane/camelize')
const camelize = require('@kamicane/camelize/camelize')
const hyphenate = require('@kamicane/camelize/hypenate')
camelize("the-quick-brown-fox")
// 'theQuickBrownFox'
camelize("the-quick-brown--fox.jumps---over..the-lazy_dog")
// 'theQuickBrownFoxJumpsOverTheLazyDog'
camelize("-the-quick")
// 'TheQuick'
> hyphenate('theQuickBrownFox')
// 'the-quick-brown-fox'
> hyphenate('TheQuickBrownFox')
// '-the-quick-brown-fox'
> hyphenate('theQuickBrownFox', '.')
// 'the.quick.brown.fox'