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