Debian Codegraph @

string/#/camel-to-hyphen.js

raw symbols SCIP
1 "use strict";
2
3 var replace = String.prototype.replace, re = /([A-Z])/g;
4
5 module.exports = function () {
6 var str = replace.call(this, re, "-$1").toLowerCase();
7 if (str[0] === "-") str = str.slice(1);
8 return str;
9 };