Skip to content

Commit 2f52390

Browse files
committed
Updated dist for Version 3.9.3 and npm audit fix to fix vulnerable packages
1 parent f604225 commit 2f52390

File tree

3 files changed

+262
-152
lines changed

3 files changed

+262
-152
lines changed

dist/jsmediatags.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ function getTextEncoding(bite) {
15021502

15031503
function getUserDefinedFields(offset, length, data, charset) {
15041504
var userDesc = data.getStringWithCharsetAt(offset + 1, length - 1, charset);
1505-
var userDefinedData = data.getStringWithCharsetAt(offset + 1 + userDesc.bytesReadCount, length - 1 - userDesc.bytesReadCount);
1505+
var userDefinedData = data.getStringWithCharsetAt(offset + 1 + userDesc.bytesReadCount, length - 1 - userDesc.bytesReadCount, charset);
15061506
return {
15071507
user_description: userDesc.toString(),
15081508
data: userDefinedData.toString()
@@ -2451,7 +2451,7 @@ function () {
24512451
module.exports = MediaTagReader;
24522452

24532453
},{"./MediaFileReader":11}],13:[function(require,module,exports){
2454-
"use strict";
2454+
'use strict';
24552455

24562456
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24572457

@@ -2495,10 +2495,10 @@ var StringUtils = {
24952495
offset2 = 0;
24962496
maxBytes = Math.min(maxBytes || bytes.length, bytes.length);
24972497

2498-
if (bytes[0] == 0xfe && bytes[1] == 0xff) {
2498+
if (bytes[0] == 0xFE && bytes[1] == 0xFF) {
24992499
bigEndian = true;
25002500
ix = 2;
2501-
} else if (bytes[0] == 0xff && bytes[1] == 0xfe) {
2501+
} else if (bytes[0] == 0xFF && bytes[1] == 0xFE) {
25022502
bigEndian = false;
25032503
ix = 2;
25042504
}
@@ -2518,7 +2518,7 @@ var StringUtils = {
25182518

25192519
if (word1 == 0x0000) {
25202520
break;
2521-
} else if (byte1 < 0xd8 || byte1 >= 0xe0) {
2521+
} else if (byte1 < 0xD8 || byte1 >= 0xE0) {
25222522
arr[j] = String.fromCharCode(word1);
25232523
} else {
25242524
var byte3 = bytes[ix + offset1];
@@ -2535,7 +2535,7 @@ var StringUtils = {
25352535
var ix = 0;
25362536
maxBytes = Math.min(maxBytes || bytes.length, bytes.length);
25372537

2538-
if (bytes[0] == 0xef && bytes[1] == 0xbb && bytes[2] == 0xbf) {
2538+
if (bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) {
25392539
ix = 3;
25402540
}
25412541

@@ -2548,19 +2548,19 @@ var StringUtils = {
25482548
break;
25492549
} else if (byte1 < 0x80) {
25502550
arr[j] = String.fromCharCode(byte1);
2551-
} else if (byte1 >= 0xc2 && byte1 < 0xe0) {
2551+
} else if (byte1 >= 0xC2 && byte1 < 0xE0) {
25522552
var byte2 = bytes[ix++];
2553-
arr[j] = String.fromCharCode(((byte1 & 0x1f) << 6) + (byte2 & 0x3f));
2554-
} else if (byte1 >= 0xe0 && byte1 < 0xf0) {
2553+
arr[j] = String.fromCharCode(((byte1 & 0x1F) << 6) + (byte2 & 0x3F));
2554+
} else if (byte1 >= 0xE0 && byte1 < 0xF0) {
25552555
var byte2 = bytes[ix++];
25562556
var byte3 = bytes[ix++];
2557-
arr[j] = String.fromCharCode(((byte1 & 0xff) << 12) + ((byte2 & 0x3f) << 6) + (byte3 & 0x3f));
2558-
} else if (byte1 >= 0xf0 && byte1 < 0xf5) {
2557+
arr[j] = String.fromCharCode(((byte1 & 0xFF) << 12) + ((byte2 & 0x3F) << 6) + (byte3 & 0x3F));
2558+
} else if (byte1 >= 0xF0 && byte1 < 0xF5) {
25592559
var byte2 = bytes[ix++];
25602560
var byte3 = bytes[ix++];
25612561
var byte4 = bytes[ix++];
2562-
var codepoint = ((byte1 & 0x07) << 18) + ((byte2 & 0x3f) << 12) + ((byte3 & 0x3f) << 6) + (byte4 & 0x3f) - 0x10000;
2563-
arr[j] = String.fromCharCode((codepoint >> 10) + 0xd800, (codepoint & 0x3ff) + 0xdc00);
2562+
var codepoint = ((byte1 & 0x07) << 18) + ((byte2 & 0x3F) << 12) + ((byte3 & 0x3F) << 6) + (byte4 & 0x3F) - 0x10000;
2563+
arr[j] = String.fromCharCode((codepoint >> 10) + 0xD800, (codepoint & 0x3FF) + 0xDC00);
25642564
}
25652565
}
25662566

0 commit comments

Comments
 (0)