这是PascalCase: SomeSymbol

这是骆驼

这是snake_case: some_symbol

所以我的问题是,这是否有一个被广泛接受的名称:某种符号?它通常用于url。


当前回答

它有时也被称为毛虫病

其他回答

我一直叫它,也听人叫它“仪表盘”。

它有时也被称为毛虫病

我的ECMAScript建议String.prototype.toKebabCase。

String.prototype.toKebabCase = function () {
  return this.valueOf().replace(/-/g, ' ').split('')
    .reduce((str, char) => char.toUpperCase() === char ?
      `${str} ${char}` :
      `${str}${char}`, ''
    ).replace(/ * /g, ' ').trim().replace(/ /g, '-').toLowerCase();
}

我只想说它是连字符。

值得一提的是从废除:

https://github.com/tpope/vim-abolish/blob/master/doc/abolish.txt#L152

仪表盘或烤串盒