Converts a string to snake case.
Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
The string that is to be changed to snake case.
const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request' Copy
const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
Alias