thai-typo-check
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -44,3 +44,3 @@ const wordBreak = require("word-break-trie"); | ||
if (!currentTrie.hasWord(last)) { | ||
return `${ret}${last}`; | ||
return `${ret}>>${last}<<`; | ||
} | ||
@@ -47,0 +47,0 @@ } |
{ | ||
"name": "thai-typo-check", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "for check thai typo", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,4 +25,4 @@ # thai-typo-check | ||
expect(thaiTypoCheckWords(goodSentence)).toBe(undefined); | ||
expect(thaiTypoCheckWords(typoSentence)).toEqual(["ผฟใก่ร์"]); | ||
expect(thaiTypoCheckWords(typoSentence)).toEqual("ฉัน,อยาก,กิน>>ผฟใก่ร์<<"); | ||
}); | ||
``` |
@@ -33,5 +33,5 @@ const { thaiTypoCheck, thaiTypoCheckWords } = require("."); | ||
it("returns array of typos if any", () => { | ||
expect(thaiTypoCheckWords("มาผผผผtestมาฝฝฝฝ")).toBe("มาผผผผ"); | ||
it("returns next typo when found typo", () => { | ||
expect(thaiTypoCheckWords("มาผผผผtestมาฝฝฝฝ")).toBe("มา>>ผผผผ<<"); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
858942