Skip to content

Commit

Permalink
refactor(cli-shred): 减少不必要的字符串转换
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto-J authored and zhetengbiji committed Apr 30, 2024
1 parent 9a52d56 commit daff690
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/uni-cli-shared/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export function checkElementNodeTag(
export function normalizeIdentifier(str: string) {
let _str = str.replace(/[^a-zA-Z0-9]+/g, '-')
_str = capitalize(camelize(_str))
_str = _str.replace(/-/g, '_')
// 不允许数字开头,补充 _
if (/^\d/.test(_str)) {
_str = '_' + _str
Expand Down

0 comments on commit daff690

Please sign in to comment.