
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
CaPiTaLiZe StRiNgS in 29 ways!
A lightweight, zero-dependency library for text capitalization and transformation. Perfect for formatting strings for code, URLs, display, or fun!
npm install capstring
import capstring from 'capstring';
capstring('hello world', 'title'); // 'Hello World'
capstring('hello world', 'camel'); // 'helloWorld'
capstring('hello world', 'kebab'); // 'hello-world'
capstring('hello world', 'constant'); // 'HELLO_WORLD'
capstring('hello world', 'leet'); // 'h3££0 w0r£d'
capstring('hello world', 'hashtag'); // '#HelloWorld'
| Style | Input | Output |
|---|---|---|
same | Hello World | Hello World |
none | Hello World | (empty) |
proper | Hello World | Hello World |
title | hello world | Hello World |
sentence | hello world | Hello world |
upper | hello world | HELLO WORLD |
lower | HELLO WORLD | hello world |
swap | Hello World | hELLO wORLD |
| Style | Input | Output |
|---|---|---|
camel | hello world | helloWorld |
pascal | hello world | HelloWorld |
snake | hello world | hello_world |
kebab | hello world | hello-world |
slug | hello world | hello-world |
constant | hello world | HELLO_WORLD |
python | hello world | HELLO_WORLD |
dot | hello world | hello.world |
path | hello world | hello/world |
train | hello world | Hello-World |
| Style | Input | Output |
|---|---|---|
leet | hello world | h3££0 w0r£d |
reverse | hello world | dlrow olleh |
sponge | hello world | HeLlO WoRlD |
mock | hello world | hElLo wOrLd |
alternate | hello world | hElLo WoRlD |
crazy | hello world | (deterministic random) |
random | hello world | (random case) |
| Style | Input | Output |
|---|---|---|
hashtag | hello world | #HelloWorld |
acronym | as soon as possible | ASAP |
rot13 | hello | uryyb |
flip | hello | ollǝɥ |
capstring(str, style)Transform a string to the specified style.
import capstring from 'capstring';
capstring('hello world', 'title'); // 'Hello World'
capstring('hello world'); // 'hello world' (default: same)
capstring(123); // false (invalid input)
getStyles()Get an array of all supported style names.
import { getStyles } from 'capstring';
getStyles(); // ['same', 'none', 'proper', 'title', ...]
isValidStyle(style)Check if a style is supported.
import { isValidStyle } from 'capstring';
isValidStyle('kebab'); // true
isValidStyle('invalid'); // false
STYLESFrozen array of all style names.
import { STYLES } from 'capstring';
STYLES.length; // 29
Looking for an API? Check out cAPIta - a full REST API powered by capstring!
curl https://your-api.com/title/hello%20world
# {"input":"hello world","output":"Hello World","cap":"title"}
npm install # Install dependencies
npm test # Run tests
npm run lint # Run linter
npm run test:coverage # Test with coverage
Please read CONTRIBUTING.md for details on the code of conduct and the process for submitting pull requests.
This project uses Semantic Versioning 2.0.
import/export)MIT - Copyright 2016-2026 Brian Funk
FAQs
CaPiTaLiZe StRiNgS in 24+ ways!
We found that capstring demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.