
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
util-string-case
Advanced tools
string case testing and conversion: mixed snake case, screaming snake case, screaming dash case, screaming dot case, screaming slash case, snake case, dash case, dot case, slash case, camel case
Small utility library implementing string case testing and conversion: mixed snake case, screaming snake case, screaming dash case, screaming dot case, screaming slash case, screaming space case, snake case, dash case, dot case, slash case, space case, space caps case, camel case.
Case tests are done by pre-analyzing string content to make multiple tests for various case styles efficient.
Case Names:
camelCase
PascalCase
snake_case
Mixed_Snake_Case
SCREAMING_SNAKE_CASE
dot.case
Mixed.Dot.Case
SCREAMING.DOT.CASE
dash-case
Mixed-Dash-Case
SCREAMING-DASH-CASE
slash/case
Mixed/Slash/Case
SCREAMING/SLASH/CASE
space case
Mixed Space Case
SCREAMING SPACE CASE
defines StringCase
class which takes a string as construction argument and provides on the
instance:
Test original string for being of given case
.isMixedCamelCase()
.isMixedSnakeCase()
.isMixedDashCase()
.isMixedDotCase()
.isMixedSlashCase()
.isMixedSpaceCase()
.isScreamingSnakeCase()
.isScreamingDashCase()
.isScreamingDotCase()
.isScreamingSlashCase()
.isScreamingSpaceCase()
.isSnakeCase()
.isDashCase()
.isDotCase()
.isSlashCase()
.isSpaceCase()
.isCapitalizedSpaceCase()
.hasNoUpperCase()
.hasNoLowerCase()
.hasUpperCase()
.hasLowerCase()
.hasLowerCaseOrUpperCase()
.isLowerCase()
.isUpperCase()
.isCamelCase()
.isPascalCase()
Test if can convert original string to given case
.canBeMixedSnakeCase()
.canBeScreamingSnakeCase()
.canBeSnakeCase()
.canBeMixedDashCase()
.canBeScreamingDashCase()
.canBeDashCase()
.canBeMixedDotCase()
.canBeScreamingDotCase()
.canBeDotCase()
.canBeMixedSlashCase()
.canBeScreamingSlashCase()
.canBeSlashCase()
.canBeMixedSpaceCase()
.canBeScreamingSpaceCase()
.canBeSpaceCase()
.canBeCapitalizedSpaceCase()
.canBeCamelCase()
.canBeProperCamelCase()
.canBePascalCase()
Convert original string to given case
.makeMixedSnakeCase()
.makeMixedDotCase()
.makeMixedDashCase()
.makeMixedSlashCase()
.makeMixedSpaceCase()
.makeProperSnakeCase()
.makeProperDotCase()
.makeProperDashCase()
.makeProperSlashCase()
.makeProperSpaceCase()
.makeCamelCase()
.makeProperCamelCase()
.makePascalCase()
.makeScreamingSnakeCase()
.makeSnakeCase()
.makeScreamingDashCase()
.makeDashCase()
.makeScreamingDotCase()
.makeDotCase()
.makeScreamingSlashCase()
.makeSlashCase()
.makeSpaceCase()
.makeScreamingSpaceCase()
.makeCapitalizedSpaceCase()
Use npm to install.
npm install util-string-case --save
MIT, see LICENSE.md for details.
FAQs
string case testing and conversion: mixed snake case, screaming snake case, screaming dash case, screaming dot case, screaming slash case, snake case, dash case, dot case, slash case, camel case
We found that util-string-case demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.