@marteye/studiojs 1.1.45 → 1.1.46
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.
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5938,8 +5938,8 @@ class CattlePassport {
|
|
|
5938
5938
|
}
|
|
5939
5939
|
static parse(code) {
|
|
5940
5940
|
let raw = code;
|
|
5941
|
-
//
|
|
5942
|
-
let trimmed = code.replace(/[\x00-\x1F\x7F]/g, "").trim();
|
|
5941
|
+
// Normalise: uppercase (some scanners send lowercase) and strip control characters
|
|
5942
|
+
let trimmed = code.toUpperCase().replace(/[\x00-\x1F\x7F]/g, "").trim();
|
|
5943
5943
|
if (trimmed.length < CattlePassport.BARCODE_MIN_LENGTH ||
|
|
5944
5944
|
trimmed.length > CattlePassport.BARCODE_MAX_LENGTH)
|
|
5945
5945
|
return null;
|
package/dist/index.js
CHANGED
|
@@ -5942,8 +5942,8 @@ class CattlePassport {
|
|
|
5942
5942
|
}
|
|
5943
5943
|
static parse(code) {
|
|
5944
5944
|
let raw = code;
|
|
5945
|
-
//
|
|
5946
|
-
let trimmed = code.replace(/[\x00-\x1F\x7F]/g, "").trim();
|
|
5945
|
+
// Normalise: uppercase (some scanners send lowercase) and strip control characters
|
|
5946
|
+
let trimmed = code.toUpperCase().replace(/[\x00-\x1F\x7F]/g, "").trim();
|
|
5947
5947
|
if (trimmed.length < CattlePassport.BARCODE_MIN_LENGTH ||
|
|
5948
5948
|
trimmed.length > CattlePassport.BARCODE_MAX_LENGTH)
|
|
5949
5949
|
return null;
|