CODE128B.js 298 B

1234567891011121314
  1. import CODE128 from './CODE128.js';
  2. import { B_START_CHAR, B_CHARS } from './constants';
  3. class CODE128B extends CODE128 {
  4. constructor(string, options) {
  5. super(B_START_CHAR + string, options);
  6. }
  7. valid() {
  8. return (new RegExp(`^${B_CHARS}+$`)).test(this.data);
  9. }
  10. }
  11. export default CODE128B;