Skip to content

Commit

Permalink
refactor: rename I => index (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
2wheeh authored Aug 5, 2024
1 parent 26552bb commit 78cde66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/standardizePronunciation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ export function standardizePronunciation(hangul: string, options: Options = { ha
}

const processSyllables = (syllables: Syllable[], phrase: string, options: Options) =>
syllables.map((currentSyllable, I, array) => {
const nextSyllable = I < array.length - 1 ? array[I + 1] : null;
syllables.map((currentSyllable, index, array) => {
const nextSyllable = index < array.length - 1 ? array[index + 1] : null;

const { current, next } = applyRules({
currentSyllable,
phrase,
index: I,
index,
nextSyllable,
options,
});

if (next) {
array[I + 1] = next;
array[index + 1] = next;
}

return current;
Expand Down

0 comments on commit 78cde66

Please sign in to comment.