index.js 463 B

12345678910111213141516171819202122
  1. import Barcode from "../Barcode.js";
  2. class GenericBarcode extends Barcode{
  3. constructor(data, options){
  4. super(data, options); // Sets this.data and this.text
  5. }
  6. // Return the corresponding binary numbers for the data provided
  7. encode(){
  8. return {
  9. data: "10101010101010101010101010101010101010101",
  10. text: this.text
  11. };
  12. }
  13. // Resturn true/false if the string provided is valid for this encoder
  14. valid(){
  15. return true;
  16. }
  17. }
  18. export {GenericBarcode};