Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

thai-typo-check

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thai-typo-check - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

7

index.js

@@ -38,3 +38,2 @@ const wordBreak = require("word-break-trie");

const inputs = sentenceSplit(correctContent(inputText));
const typos = [];

@@ -46,9 +45,9 @@ for (let input of inputs) {

if (!currentTrie.hasWord(last)) {
typos.push(last);
return `${ret}${last}`;
}
}
}
if (typos.length > 0) return typos;
// return true when pass all validation
else return undefined;
return undefined;
}

@@ -55,0 +54,0 @@

{
"name": "thai-typo-check",
"version": "1.0.6",
"version": "1.0.7",
"description": "for check thai typo",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -34,5 +34,4 @@ const { thaiTypoCheck, thaiTypoCheckWords } = require(".");

it("returns array of typos if any", () => {
const expectedArray = ["ผผผผ", "ฝฝฝฝ"];
expect(thaiTypoCheckWords("มาผผผผtestมาฝฝฝฝ")).toEqual(expectedArray);
expect(thaiTypoCheckWords("มาผผผผtestมาฝฝฝฝ")).toBe("มาผผผผ");
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc