clean-jsdoc-theme TypeDoc APIv0.0.0

snakeCase

snakeCase(str: string): string

Source: string.ts:88

Converts a string to snake_case

Parameters

  • str (string) — The input string

Returns

  • string — snake_cased string

Example

CODE
snakeCase('helloWorld') // 'hello_world'
snakeCase('HelloWorld') // 'hello_world'
snakeCase('hello-world') // 'hello_world'