diff --git a/utilities/filter.js b/utilities/filter.js index c0055f5..795947b 100644 --- a/utilities/filter.js +++ b/utilities/filter.js @@ -1,5 +1,5 @@ function isBarcode(toFilter) { - const exp = /^A0A3B82[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]$/; + const exp = /^A0A3B82[A-F0-9]{5}$/; return exp.test(toFilter); } let n = true; @@ -9,7 +9,7 @@ function isShelving(toFilter) { toFilter = Array; toFilter[0] = s; } - const exp = /^[A-Z][A-Z][A-Z]$/; + const exp = /^[A-Z]{3}$/; for (let i = 0; i < toFilter.length; i++) { let state = exp.test(toFilter[i]); if (state == false) @@ -20,6 +20,5 @@ function isShelving(toFilter) { else return true; } - exports.isBarcode = isBarcode; exports.isShelving = isShelving;