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