Date

“String” Methods

_.kebabCase([string=''])

source npm package

Converts string to kebab case.

引入版本

3.0.0

参数
[string=''] (string) : The string to convert.

返回值
(string) : Returns the kebab cased string.

示例
_.kebabCase('Foo Bar');
// => 'foo-bar'
 
_.kebabCase('fooBar');
// => 'foo-bar'
 
_.kebabCase('__FOO_BAR__');
// => 'foo-bar'