Aerostack
edit

text-to-snake-case Edge Function — Content

Content

Converts a camelCase, PascalCase, kebab-case, or space-separated string to snake_case. Zero dependencies.

navin @navin verified
Updated Mar 12, 2026
GitHub

Edge function text-to-snake-case Converts a camelCase, PascalCase, kebab-case, or space-separated string to snake_case. Zero dependencies.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.

terminal — aerostack cli
$ npx aerostack add navin/text-to-snake-case
smart_toy

Use with AI Assistants

MCP

Connect Claude, Cursor, or any MCP-compatible client — then call this function by slug

① Add MCP Server

Add this once — access all Aerostack functions from your AI tool.

claude_desktop_config.json
{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev",
      "type": "http"
    }
  }
}

② Call this function

Ask your AI to use the call_function tool with this slug:

call_function
call_function({
  slug: "text-to-snake-case",
  args: {
    "text": "example_text"
  }
})

text-to-snake-case

Converts a camelCase, PascalCase, kebab-case, or space-separated string to snake_case. Zero external dependencies.

Install

aerostack function add text-to-snake-case

Usage

import { toSnakeCase } from './functions/text-to-snake-case';

toSnakeCase('helloWorld');      // 'hello_world'
toSnakeCase('HelloWorld');      // 'hello_world'
toSnakeCase('hello-world');     // 'hello_world'
toSnakeCase('hello world');     // 'hello_world'
toSnakeCase('HELLO_WORLD');     // 'hello_world'
toSnakeCase('XMLParser');       // 'xml_parser'
toSnakeCase('base64Encoded');   // 'base64_encoded'
toSnakeCase('');                // null (error)

API

POST /api/text-to-snake-case
{ "text": "helloWorld" }
{ "success": true, "data": { "result": "hello_world" } }
Field Type Required Description
text string Yes The string to convert to snake_case

Metadata

upgrade Version 1.0.0
gavel License MIT
language Language typescript
cloud Provider aerostack

Tags

text
deployed_code

Build and publish your own functions

Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.

More Content Functions

Browse Content Functions →

Frequently asked questions

What does the text-to-snake-case function do? +

text-to-snake-case is a serverless edge function for content automation written in aerostack. Deploy it to Cloudflare Workers via your Aerostack workspace.

How do I deploy the text-to-snake-case function? +

Install the Aerostack CLI and run: ```bash aerostack deploy function @navin/text-to-snake-case ``` It will be live on Cloudflare Workers in seconds.

What runtime does text-to-snake-case use? +

text-to-snake-case runs on aerostack on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.

Can I customise the text-to-snake-case function? +

Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.