Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b4c33d

Browse files
felixonmarsaaronang
authored andcommitted
Fix a typo: occurences -> occurrences (#5575)
1 parent b3c7337 commit 9b4c33d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/babel-generator/src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function findCommonStringDelimiter(code, tokens) {
9999
return DEFAULT_STRING_DELIMITER;
100100
}
101101

102-
const occurences = {
102+
const occurrences = {
103103
single: 0,
104104
double: 0
105105
};
@@ -112,15 +112,15 @@ function findCommonStringDelimiter(code, tokens) {
112112

113113
const raw = code.slice(token.start, token.end);
114114
if (raw[0] === "'") {
115-
occurences.single++;
115+
occurrences.single++;
116116
} else {
117-
occurences.double++;
117+
occurrences.double++;
118118
}
119119

120120
checked++;
121121
if (checked >= 3) break;
122122
}
123-
if (occurences.single > occurences.double) {
123+
if (occurrences.single > occurrences.double) {
124124
return "single";
125125
} else {
126126
return "double";

0 commit comments

Comments
 (0)