effect-io-ai

Package: effect
Module: String

String.camelToSnake

Converts a camelCase string to snake_case.

Example (Converting camelCase to snake_case)

import { String } from "effect"

console.log(String.camelToSnake("helloWorld")) // "hello_world"
console.log(String.camelToSnake("fooBarBaz")) // "foo_bar_baz"

Signature

declare const camelToSnake: (self: string) => string

Source

Since v2.0.0