@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 CHANGED
@@ -5938,8 +5938,8 @@ class CattlePassport {
5938
5938
  }
5939
5939
  static parse(code) {
5940
5940
  let raw = code;
5941
- // Strip ASCII control characters (GS, CR, etc.) that barcode scanners may append
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
- // Strip ASCII control characters (GS, CR, etc.) that barcode scanners may append
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marteye/studiojs",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "description": "MartEye Studio JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",