chore(style): add keyword spacing rule (#1098)

This commit is contained in:
q1anx1
2022-09-04 19:40:30 +08:00
committed by GitHub
parent 8128671c8c
commit 35676455bc
4 changed files with 7 additions and 6 deletions

View File

@ -450,9 +450,9 @@ export function trim(str, ch) {
let start = 0;
let end = str.length;
while(start < end && str[start] === ch) {++start;}
while (start < end && str[start] === ch) {++start;}
while(end > start && str[end - 1] === ch) {--end;}
while (end > start && str[end - 1] === ch) {--end;}
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
}