string.underscore
string.underscore(s)
Parameters
- str
{String}
:a string in camelCase
Returns
{String}
:
the supplied string with camelCase converted to underscore-lowercase digraphs
var string = require("can-util/js/string/string");
console.log(string.underscore("fooBar")); // -> "foo_bar"
console.log(string.underscore("HTMLElement")); // -> "html_element"