Blame view

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