MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / hyphenate

Function hyphenate

code/composition/public/app.js:527–529  ·  view source on GitHub ↗

* Hyphenates a camelcased string, for example: * * > hyphenate('backgroundColor') * < "background-color" * * For CSS style names, use `hyphenateStyleName` instead which works properly * with all vendor prefixes, including `ms`. * * @param {string} string * @return {string}

(string)

Source from the content-addressed store, hash-verified

525 * @return {string}
526 */
527function hyphenate(string) {
528 return string.replace(_uppercasePattern, '-$1').toLowerCase();
529}
530
531module.exports = hyphenate;
532},{}],12:[function(require,module,exports){

Callers 1

hyphenateStyleNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected