Skip to content

Commit

Permalink
Merge pull request #43 from minsooshin/fix-eslint-fails
Browse files Browse the repository at this point in the history
Fix eslint fails
  • Loading branch information
yjlim5 authored Apr 26, 2017
2 parents e9b21fb + 3331079 commit f903653
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/korean.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const breakdown = (input) => {
// output: a hangul character
const combineSymbols = (input) => {
let unicodeTotal = (input[0] * 588) + (input[1] * 28) + 44032;
if(input.length === 3) {
if (input.length === 3) {
unicodeTotal += input[2];
}
return String.fromCharCode(unicodeTotal);
Expand Down Expand Up @@ -138,15 +138,14 @@ class Korean {
if (stem.length < 3) {
stem.push(8);
return `${combineSymbols(stem)} 거야`;
} else {
if (stem[stem.length-1] === 17) {
stem.pop();
return `${combineSymbols(stem)}울 거야`;
} else if (stem[stem.length-1] === 8) {
return `${combineSymbols(stem)} 거야`;
}
return `${combineSymbols(stem)}을 거야`;
}
if (stem[stem.length - 1] === 17) {
stem.pop();
return `${combineSymbols(stem)}울 거야`;
} else if (stem[stem.length - 1] === 8) {
return `${combineSymbols(stem)} 거야`;
}
return `${combineSymbols(stem)}을 거야`;
}
} // end for class

Expand Down

0 comments on commit f903653

Please sign in to comment.