src/barcodes/GenericBarcode/index.js   A
last analyzed

Size

Lines of Code 22

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 22
rs 10
c 0
b 0
f 0
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.js ➔ ??? 0 3 1
1
import Barcode from "../Barcode.js";
2
3
class GenericBarcode extends Barcode{
4
	constructor(data, options){
5
		super(data, options); // Sets this.data and this.text
6
	}
7
8
	// Return the corresponding binary numbers for the data provided
9
	encode(){
10
		return {
11
			data: "10101010101010101010101010101010101010101",
12
			text: this.text
13
		};
14
	}
15
16
	// Resturn true/false if the string provided is valid for this encoder
17
	valid(){
18
		return true;
19
	}
20
}
21
22
export {GenericBarcode};
23