@nebulaai/capitalize-first
v0.1.1
Published
Capitalize the first letter of a string
Readme
🌟 capitalize-first
One letter. Maximum impact. Make every string start like it means business.
Pure string power from the NebulaAI arsenal
⚡ Get Started (Lightning fast)
npm install @nebulaai/capitalize-first🔥 Watch the magic happen
import { capitalizeFirst } from "@nebulaai/capitalize-first";
// Transform user input like a pro
capitalizeFirst("hello world"); // → "Hello world"
capitalizeFirst("SCREAMING TEXT"); // → "SCREAMING TEXT"
capitalizeFirst("camelCaseStuff"); // → "CamelCaseStuff"
capitalizeFirst("99 problems"); // → "99 problems"
// Perfect for UI polish
const userName = "sarah_dev_2024";
const displayName = capitalizeFirst(userName); // → "Sarah_dev_2024"🚀 Why developers choose this
- Microscopic bundle: Adds literally nothing to your build size
- Bulletproof: Handles edge cases you forgot existed
- TypeScript native: IntelliSense that actually helps
- Zero deps: No dependency hell, ever
- Works everywhere: Node, Deno, Bun, browsers - anywhere JS runs
🛠️ API That Never Fails
capitalizeFirst(str: string): string| Input | Output | Vibe Check |
|-------|--------|------------|
| "hello" | "Hello" | ✨ Clean |
| "HELLO" | "HELLO" | 🎯 Smart |
| "" | "" | 🛡️ Safe |
Pro move: Handles empty strings, weird unicode, and everything in between without breaking a sweat.
🎯 Perfect for
- User-facing text → Professional first impressions
- Form validation → Clean up messy input instantly
- Content management → Consistent formatting everywhere
- API responses → Polish data before it hits the frontend
- Template strings → Dynamic content that looks intentional
💡 Before vs After
// Before: Manual, error-prone, forgettable
function makeNice(str) {
if (!str) return str;
return str.charAt(0).toUpperCase() + str.slice(1);
}
// After: One import, infinite confidence
import { capitalizeFirst } from "@nebulaai/capitalize-first";
const result = capitalizeFirst(userInput); // Just works ™️📄 License
MIT © Jorge Gonzalez / Temporal AI Technologies Inc.
Empowering developers to build better, faster, cleaner
