@kamicane/camelize

1.0.0 • Public • Published

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'

Package Sidebar

Install

npm i @kamicane/camelize

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

1.92 kB

Total Files

7

Last publish

Collaborators

  • kamicane