id-to-readable-text
simple-ai/id-to-readable-textFreeUtility
A utility for converting an ID to a readable text.
Live preview
live · rendered by the registry
Rendered by simple-ai on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://simple-ai.dev/r/id-to-readable-text.jsonSource
1export function idToReadableText(2 id: string,3 options?: { capitalize?: boolean },4): string {5 const { capitalize = true } = options || {};6 const readable = id7 .replace(/([a-z])([A-Z])/g, "$1 $2")8 .replace(/[_-]/g, " ")9 .toLowerCase();1011 return capitalize12 ? readable.replace(/\b\w/g, (l) => l.toUpperCase())13 : readable;14}
Files it writes
More from simple-ai
All 77 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| agent-respondagent-respond | simple-ai | Utilities | Free | 1 dep | |
| agents-tools-registryagents-tools-registry | simple-ai | Utilities | Free | 1 dep · 2 files | |
| ai-utilsai-utils | simple-ai | Utilities | Free | 1 dep | |
| Exa Agentexa-agent | simple-ai | Utilities | Free | 1 dep | |
| exa-toolexa-tool | simple-ai | Utilities | Free | 3 deps | |
| Firecrawl Agentfirecrawl-agent | simple-ai | Utilities | Free | 1 dep | |
| firecrawl-toolfirecrawl-tool | simple-ai | Utilities | Free | 3 deps | |
| get-weatherget-weather | simple-ai | Utilities | Free | 2 deps |
