Skip to content

Commit

Permalink
Release v3.3.23
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Lindell committed Sep 3, 2016
1 parent c31ed76 commit 9300662
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 27 deletions.
2 changes: 1 addition & 1 deletion bin/JsBarcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ API.prototype.init = function () {
// The render API call. Calls the real render function.
API.prototype.render = function () {
if (Array.isArray(this._renderProperties)) {
for (var i in this._renderProperties) {
for (var i = 0; i < this._renderProperties.length; i++) {
render(this._renderProperties[i], this._encodings, this._options);
}
} else {
Expand Down
18 changes: 11 additions & 7 deletions bin/barcodes/CODE39/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ var CODE39 = function () {

// Calculate mod43 checksum if enabled
if (this.mod43Enabled) {
var checksum = 0;
for (var _i = 0; _i < this.string.length; _i++) {
checksum += this.characterValue(this.string[_i]);
}

checksum = checksum % 43;

var checksum = this.mod43checksum();
result += this.getBinary(checksum) + "0";
string += this.getCharacter(checksum);
}
Expand All @@ -83,6 +77,16 @@ var CODE39 = function () {
return this.string.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
};

CODE39.prototype.mod43checksum = function mod43checksum() {
var checksum = 0;
for (var i = 0; i < this.string.length; i++) {
checksum += this.characterValue(this.string[i]);
}

checksum = checksum % 43;
return checksum;
};

return CODE39;
}();

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "JsBarcode",
"main": "dist/JsBarcode.all.min.js",
"version": "3.3.20",
"version": "3.3.23",
"homepage": "https://github.com/lindell/JsBarcode",
"authors": [
"Johan Lindell <johan@lindell.me>"
Expand Down
20 changes: 12 additions & 8 deletions dist/JsBarcode.all.js
Original file line number Diff line number Diff line change
Expand Up @@ -1278,13 +1278,7 @@ var CODE39 = function () {

// Calculate mod43 checksum if enabled
if (this.mod43Enabled) {
var checksum = 0;
for (var _i = 0; _i < this.string.length; _i++) {
checksum += this.characterValue(this.string[_i]);
}

checksum = checksum % 43;

var checksum = this.mod43checksum();
result += this.getBinary(checksum) + "0";
string += this.getCharacter(checksum);
}
Expand All @@ -1302,6 +1296,16 @@ var CODE39 = function () {
return this.string.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
};

CODE39.prototype.mod43checksum = function mod43checksum() {
var checksum = 0;
for (var i = 0; i < this.string.length; i++) {
checksum += this.characterValue(this.string[i]);
}

checksum = checksum % 43;
return checksum;
};

return CODE39;
}();

Expand Down Expand Up @@ -2956,7 +2960,7 @@ API.prototype.init = function () {
// The render API call. Calls the real render function.
API.prototype.render = function () {
if (Array.isArray(this._renderProperties)) {
for (var i in this._renderProperties) {
for (var i = 0; i < this._renderProperties.length; i++) {
render(this._renderProperties[i], this._encodings, this._options);
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions dist/JsBarcode.all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.code128.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.code39.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.ean-upc.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.itf-14.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.itf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.msi.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.pharmacode.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsbarcode",
"version": "3.3.20",
"version": "3.3.23",
"description": "JsBarcode is a simple and powerfull way to create different types of 1d barcodes.",
"main": "./bin/JsBarcode.js",
"directories": {
Expand Down

0 comments on commit 9300662

Please sign in to comment.