snakeCase

String
since 3.0.0

Arguments

  • string The string to convert.

Returns

string the snake cased string.

Converts string to snake case.

Example of Lodash _.snakeCase

_.snakeCase('Foo Bar');
// => 'foo_bar'

_.snakeCase('fooBar');
// => 'foo_bar'

_.snakeCase('--FOO-BAR--');
// => 'foo_bar'