sindresorhus / camelcase

Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar
MIT License
682 stars 95 forks source link

Add target option #93

Closed FullMoon04 closed 1 year ago

FullMoon04 commented 2 years ago

I wanted to convert it to: camelCase(foo_bar.1) => fooBar.1

At present, it will be converted to fooBar1. That's why I implemented the target option.

sindresorhus commented 2 years ago

I think it would make more sense to have a preserveCharacters option which would accept an array of characters.

FullMoon04 commented 2 years ago

Thank you for your review. I fixed it.