nets-service-sdk 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,9 @@ var require_utils_helper = __commonJS({
|
|
|
32
32
|
return res.join("").toUpperCase();
|
|
33
33
|
};
|
|
34
34
|
String.prototype.toAsciiString = function() {
|
|
35
|
-
|
|
35
|
+
const matches = this.match(/.{1,2}/g);
|
|
36
|
+
if (!matches) return "";
|
|
37
|
+
return matches.map(function(v) {
|
|
36
38
|
return String.fromCharCode(parseInt(v, 16));
|
|
37
39
|
}).join("");
|
|
38
40
|
};
|
|
@@ -458,7 +460,9 @@ var require_parser = __commonJS({
|
|
|
458
460
|
let status = false;
|
|
459
461
|
const json = {};
|
|
460
462
|
for (let i = 0; i < splitted.length; i++) {
|
|
463
|
+
if (!splitted[i] || splitted[i].length === 0) continue;
|
|
461
464
|
const ascii = splitted[i].toAsciiString();
|
|
465
|
+
if (!ascii) continue;
|
|
462
466
|
if (ascii?.indexOf(ecn) > -1 || i === 0 && ascii.length >= 12) {
|
|
463
467
|
json["ECN"] = ascii.cleanUp();
|
|
464
468
|
if (ascii?.indexOf(ecn) === -1) {
|
|
@@ -488,7 +492,9 @@ var require_parser = __commonJS({
|
|
|
488
492
|
let status = false;
|
|
489
493
|
const json = {};
|
|
490
494
|
for (let i = 0; i < splitted.length; i++) {
|
|
495
|
+
if (!splitted[i] || splitted[i].length === 0) continue;
|
|
491
496
|
const ascii = splitted[i].toAsciiString();
|
|
497
|
+
if (!ascii) continue;
|
|
492
498
|
if (ascii?.indexOf(ecn) > -1 || i === 0 && ascii.length >= 12) {
|
|
493
499
|
json["ECN"] = ascii.cleanUp();
|
|
494
500
|
} else {
|
|
@@ -1415,7 +1421,7 @@ var require_package = __commonJS({
|
|
|
1415
1421
|
"package.json"(exports2, module2) {
|
|
1416
1422
|
module2.exports = {
|
|
1417
1423
|
name: "nets-service-sdk",
|
|
1418
|
-
version: "1.1.
|
|
1424
|
+
version: "1.1.21",
|
|
1419
1425
|
description: "Utility functions for Nets Service",
|
|
1420
1426
|
source: "src/index.js",
|
|
1421
1427
|
main: "dist/index.js",
|