BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/utilcn/to-camel-case

To Camel Case

utilcn/to-camel-case
FreeUtility

Convert a string to camelCase.

Install it

npx shadcn@latest add https://utilcn.dev/r/to-camel-case.json

Source

registry/default/strings/to-camel-case.tsutilcn.dev/r/to-camel-case.json
1/**
2 * Converts a string to camelCase.
3 *
4 * Handles acronyms properly, ensuring that something like
5 * "XMLHttpRequest" becomes "xmlHttpRequest".
6 *
7 * @param str - The input string.
8 * @returns The camelCased string.
9 *
10 * @example
11 * toCamelCase("hello world-example"); // "helloWorldExample"
12 * toCamelCase("XMLHttpRequest"); // "xmlHttpRequest"
13 */
14export function toCamelCase(str: string): string {
15 const result = str
16 // Split acronym groups into proper boundaries
17 .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')
18 // Split between lowercase/digit and uppercase
19 .replace(/([a-z\d])([A-Z])/g, '$1 $2')
20 // Normalize spaces/underscores/dashes
21 .replace(/[-_\s]+/g, ' ')
22 // Lowercase everything to start clean
23 .toLowerCase()
24 // Capitalize first letter of each "word" after the first
25 .replace(/\s+(\w)/g, (_, c) => c.toUpperCase())
26 // Remove any remaining spaces and trim
27 .replace(/\s+/g, '')
28 .trim();
29
30 // Ensure first character is lowercase for camelCase
31 return result.charAt(0).toLowerCase() + result.slice(1);
32}

Files it writes

  • registry/default/strings/to-camel-case.ts

Facts

Registry
utilcn
Type
registry:lib
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

utilcn.dev BrennenRocks/utilcn on GitHub Raw registry item This item as JSON

More from utilcn

All 17 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
CapitalizecapitalizeutilcnUtilitiesFreeno deps
Capitalize Allcapitalize-allutilcnUtilitiesFreeno deps
Environment Server Configurationenv-serverutilcnUtilitiesFree1 dep
Generate Presigned Download URLgenerate-presigned-download-urlutilcnUtilitiesFree2 deps · 2 files
Generate Presigned Upload URLgenerate-presigned-upload-urlutilcnUtilitiesFree2 deps · 2 files
Repeat Padrepeat-padutilcnUtilitiesFreeno deps
Reverse Stringreverse-stringutilcnUtilitiesFreeno deps
To Kebab Caseto-kebab-caseutilcnUtilitiesFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex