blakeembrey / change-case

Convert strings between camelCase, PascalCase, Capital Case, snake_case and more
MIT License
2.21k stars 92 forks source link

How to migrate to v5 from v4? #316

Closed kapicic closed 7 months ago

kapicic commented 8 months ago

We are using v4.1.2 and want to migrate to v5.0.2. In version 4, we were using the delimiter option extensively, however, reading the documentation on v5, it seems that this feature is no longer supported.

How can we migrate to the new version while still using custom delimiters?

blakeembrey commented 8 months ago

Can you give me some example usage? Mostly it’d be a matter of using split and joining it back any way you wanted, but the option can certainly be added back easy enough.

kapicic commented 8 months ago

@blakeembrey

  1. We are using noCase(input, { delimiter: '' }) - so we turn Hi Blake to hiblake
  2. We are also exposing the delimiter from the API so our users can select both a case and a delimiter

Is it possible to support such behaviour in the new version?

blakeembrey commented 7 months ago

Thanks for the response, it makes sense. I've added back the delimiter option in the latest release (v5.2).