Skip to content

Commit

Permalink
Updated Contributions file with new GenerticBarcode
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell authored Sep 23, 2016
1 parent 9f2546e commit d9bd2a2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ Implementing a new symbology is the easiest way to contribute. Just follow the s
The structure of such a class is as follows:

````javascript
class GenericBarcode{
constructor(string){
this.string = string;
import Barcode from "../Barcode.js";

class GenericBarcode extends Barcode{
constructor(data, options){
super(data, options); // Sets this.data and this.text
}

// Return the corresponding binary numbers for the data provided
encode(){
return {
data: "10101010101010101010101010101010101010101",
text: this.string
text: this.text
};
}

Expand Down

0 comments on commit d9bd2a2

Please sign in to comment.