Skip to content

Commit

Permalink
Fix a typo: occurences -> occurrences (babel#5575)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixonmars authored and jridgewell committed May 3, 2017
1 parent 86a5377 commit 16f1d60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/babel-generator/src/index.js
Expand Up @@ -98,7 +98,7 @@ function findCommonStringDelimiter(code, tokens) {
return DEFAULT_STRING_DELIMITER;
}

const occurences = {
const occurrences = {
single: 0,
double: 0,
};
Expand All @@ -111,15 +111,15 @@ function findCommonStringDelimiter(code, tokens) {

const raw = code.slice(token.start, token.end);
if (raw[0] === "'") {
occurences.single++;
occurrences.single++;
} else {
occurences.double++;
occurrences.double++;
}

checked++;
if (checked >= 3) break;
}
if (occurences.single > occurences.double) {
if (occurrences.single > occurrences.double) {
return "single";
} else {
return "double";
Expand Down

0 comments on commit 16f1d60

Please sign in to comment.