code: function camelToHyphen(str) {
    if (!str) {
      return console.error('错误: camelToHyphen 方法需要传入字符串类型的值');
    }
    return str.split(/([A-Z][^A-Z]*)/g).filter(x => {
      return x != ''
    })
      .map(x => {
        return x.toLowerCase()
      }).join('-').replace(/-+/g, '-');
  }
docs: hyphenToCamel的反函数，将大写字符转为小写并以中划线'-'分开
  @param {string} str
  @return {string}
  
  @example
  Handlebars.compile('{{camelToHyphen "AbcDefGhi"}}')() // => "abc-def-ghi"
  Handlebars.compile('{{camelToHyphen "abcDEF"}}')() // => "abc-d-e-f"
  Handlebars.compile('{{camelToHyphen "abc--DEF"}}')() // => "abc-d-e-f"
  Handlebars.compile('{{camelToHyphen "abc--DEF--"}}')() // => "abc-d-e-f-"