Skip to content

PURISTA API


PURISTA API / @purista/core / convertToSnakeCase

Function: convertToSnakeCase()

convertToSnakeCase(str): string

Defined in: helper/string/convertToSnakeCase.impl.ts:13

Converts a string into snake_case.

Parameters

str

string

Returns

string

Example

ts
convertToSnakeCase('someText')
// => 'some_text'

https://github.com/30-seconds/30-seconds-of-code