CODE128_AUTO.js 338 B

123456789101112131415
  1. import CODE128 from './CODE128';
  2. import autoSelectModes from './auto';
  3. class CODE128AUTO extends CODE128{
  4. constructor(data, options){
  5. // ASCII value ranges 0-127, 200-211
  6. if (/^[\x00-\x7F\xC8-\xD3]+$/.test(data)) {
  7. super(autoSelectModes(data), options);
  8. } else{
  9. super(data, options);
  10. }
  11. }
  12. }
  13. export default CODE128AUTO;