@anytestforpm/ocr 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/ocr.js +3 -0
  2. package/package.json +1 -1
package/ocr.js CHANGED
@@ -133,6 +133,9 @@ export const recognizeOCR = async (ImageUrl) => {
133
133
  //OCR辨識結果的內文
134
134
  const result = await worker.recognize(ImageUrl);
135
135
  const resText = String(result.data.text);
136
+ if (configData.region === "TH") {
137
+ resText = resText.replace(" ","");
138
+ }
136
139
  console.log("OCR Text >>> ", resText);
137
140
 
138
141
  //比對不合法的關鍵字
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anytestforpm/ocr",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "",
5
5
  "main": "ocr.js",
6
6
  "scripts": {