Blame view

天文台pc/tianwentai-ui/node_modules/string-convert/camel2hyphen.js 216 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
  var camel2hyphen = function (str) {
    return str
            .replace(/[A-Z]/g, function (match) {
              return '-' + match.toLowerCase();
            })
            .toLowerCase();
  };
  
  module.exports = camel2hyphen;