Version: v0.7.1 - Beta.  We welcome contributors & feedback.

String.snakeCase

snakeCase() -> string

Description

Convert to snake_case (underscores) format.

'listOfPosts'.snakeCase()
//= 'list_of_Posts'

'list-of-Posts'.snakeCase()
//= 'list_of_Posts'

'list of posts'.snakeCase()
//= 'list_of_Posts'

See Also