Releases: blakeembrey/change-case
Releases · blakeembrey/change-case
Add `prefixCharacters` option
Added
- New
prefixCharacters
option to retain characters during case conversion. Useful for something like_$
to keep "private".
Add small words option
ESM support
Changed
- Removes CommonJS support and adds ESM import support for node 16+
- Adds an optional
locale
as the second argument (now defaults to host environment usingtoLocaleUpperCase
)
ESM support
Changed
- Removes CommonJS support and adds ESM import support for node 16+
- Adds an optional
locale
as the second argument (now defaults to host environment usingtoLocale{Lower,Upper}Case
ESM support
Changed
- Removes CommonJS support and adds ESM import support for node 16+
- Adds an optional
locale
as the second argument (now defaults to host environment usingtoLocale{Lower,Upper}Case
Huge ESM rewrite
Changed:
- The package is now only supported using ESM imports in node.js
- Merged all core case changing libraries into
change-case
- Added support for internationalization using unicode regex features
- Renamed
paramCase
tokebabCase
Removed:
- Removed ability to specify word split and strip regexes
Added:
- Exposed a new
split
function for accessing behavior of word splitting before case change - Added
locale
andseparateNumbers
options - Added
pascalSnakeCase
support - Added
change-case/keys
for transforming objects into the requested case
Deprecated packages:
camel-case
(usechange-case
)capital-case
(usechange-case
)constant-case
(usechange-case
)dot-case
(usechange-case
)header-case
(usechange-case
->trainCase
)is-lower-case
(prefer manual:input.toLocaleLowerCase(locale) === input
)is-upper-case
(prefer manual:input.toLocaleUpperCase(locale) === input
)lower-case-first
(prefer manual:input.charAt(0).toLowerCase() + input.slice(1)
)lower-case
(prefer manual:input.toLowerCase()
orinput.toLocaleLowerCase(locale)
)no-case (use
change-case`)param-case
(usechange-case
->kebabCase
)pascal-case
(usechange-case
)path-case
(usechange-case
)sentence-case
(usechange-case
)snake-case
(usechange-case
)upper-case-first
(prefer manual:input.charAt(0).toLowerCase() + input.slice(1)
)upper-case
(prefer manual:input.toUpperCase()
orinput.toLocaleUpperCase(locale)
)
Fix Overlapping RegExp Splits
Fixed
- Fixes #76, e.g.
IQueryAArgs
broke because the firstA
was matched and didn't pick up the subsequentAA
overlapping
Merge Transform
Added
- Expose
pascalCaseTransformMerge
as a helper function
ES5 Support
Fixed
- Add support for ES5 environments to all packages
Merge Transform
Added
- Expose
camelCaseTransformMerge
as a transform option