node-opcua-utils 2.125.0 → 2.133.0
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/buffer_ellipsis.d.ts +0 -1
- package/dist/buffer_ellipsis.js +1 -2
- package/dist/buffer_ellipsis.js.map +1 -1
- package/dist/compare_buffers.d.ts +0 -1
- package/dist/compare_buffers.js +1 -2
- package/dist/compare_buffers.js.map +1 -1
- package/dist/get_function_parameters_name.js +1 -2
- package/dist/get_function_parameters_name.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/match_uri.js +1 -2
- package/dist/match_uri.js.map +1 -1
- package/dist/object_classname.d.ts +1 -1
- package/dist/object_classname.js +2 -3
- package/dist/object_classname.js.map +1 -1
- package/dist/replace_buffer_with_hex_dump.js +1 -2
- package/dist/replace_buffer_with_hex_dump.js.map +1 -1
- package/dist/set_deprecated.js +1 -2
- package/dist/set_deprecated.js.map +1 -1
- package/dist/string_utils.d.ts +4 -2
- package/dist/string_utils.js +12 -11
- package/dist/string_utils.js.map +1 -1
- package/dist/timestamp.js +1 -2
- package/dist/timestamp.js.map +1 -1
- package/dist/watchdog.d.ts +1 -2
- package/dist/watchdog.js +1 -1
- package/package.json +2 -6
- package/source/index.ts +2 -2
- package/source/object_classname.ts +1 -1
- package/source/string_utils.ts +5 -3
- package/source/watchdog.ts +1 -1
package/dist/buffer_ellipsis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buffer_ellipsis =
|
|
3
|
+
exports.buffer_ellipsis = buffer_ellipsis;
|
|
4
4
|
/**
|
|
5
5
|
* @module node-opcua-utils
|
|
6
6
|
*/
|
|
@@ -13,5 +13,4 @@ function buffer_ellipsis(buffer, start, end) {
|
|
|
13
13
|
return buffer.subarray(start, start + 10).toString("hex") + " ... " + buffer.subarray(end - 10, end).toString("hex");
|
|
14
14
|
}
|
|
15
15
|
exports.buffer_ellipsis = buffer_ellipsis;
|
|
16
|
-
exports.buffer_ellipsis = buffer_ellipsis;
|
|
17
16
|
//# sourceMappingURL=buffer_ellipsis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer_ellipsis.js","sourceRoot":"","sources":["../source/buffer_ellipsis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffer_ellipsis.js","sourceRoot":"","sources":["../source/buffer_ellipsis.ts"],"names":[],"mappings":";;AAGA,0CAOC;AAVD;;GAEG;AACH,SAAgB,eAAe,CAAC,MAAc,EAAE,KAAc,EAAE,GAAY;IACxE,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;IACnB,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC;IAC3B,IAAI,GAAG,GAAG,KAAK,GAAG,EAAE,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzH,CAAC;AAED,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC"}
|
package/dist/compare_buffers.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.compare_buffers =
|
|
6
|
+
exports.compare_buffers = compare_buffers;
|
|
7
7
|
/**
|
|
8
8
|
* @module node-opcua-utils
|
|
9
9
|
*/
|
|
@@ -26,5 +26,4 @@ function compare_buffers(buf1, buf2, max_length) {
|
|
|
26
26
|
}
|
|
27
27
|
// xx buf1.length.should.equal(max_length);
|
|
28
28
|
}
|
|
29
|
-
exports.compare_buffers = compare_buffers;
|
|
30
29
|
//# sourceMappingURL=compare_buffers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare_buffers.js","sourceRoot":"","sources":["../source/compare_buffers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compare_buffers.js","sourceRoot":"","sources":["../source/compare_buffers.ts"],"names":[],"mappings":";;;;;AAOA,0CAeC;AAtBD;;GAEG;AACH,4BAA4B;AAC5B,kDAA0B;AAC1B,uDAAoD;AAEpD,SAAgB,eAAe,CAAC,IAAY,EAAE,IAAY,EAAE,UAAmB;IAC3E,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC;IACvC,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,OAAO,MAAM,GAAG,UAAU,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC;QAC5D,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,eAAK,CAAC,MAAM,CAAC,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC/D,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,eAAK,CAAC,IAAI,CAAC,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,IAAI,YAAY,CAAC;IAC3B,CAAC;IACD,2CAA2C;AAC/C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFunctionParameterNames =
|
|
3
|
+
exports.getFunctionParameterNames = getFunctionParameterNames;
|
|
4
4
|
/**
|
|
5
5
|
* @module node-opcua-utils
|
|
6
6
|
*/
|
|
@@ -14,5 +14,4 @@ function getFunctionParameterNames(func) {
|
|
|
14
14
|
}
|
|
15
15
|
return result;
|
|
16
16
|
}
|
|
17
|
-
exports.getFunctionParameterNames = getFunctionParameterNames;
|
|
18
17
|
//# sourceMappingURL=get_function_parameters_name.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_function_parameters_name.js","sourceRoot":"","sources":["../source/get_function_parameters_name.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_function_parameters_name.js","sourceRoot":"","sources":["../source/get_function_parameters_name.ts"],"names":[],"mappings":";;AAOA,8DAOC;AAdD;;GAEG;AACH,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D,MAAM,cAAc,GAAG,YAAY,CAAC;AAGpC,SAAgB,yBAAyB,CAAC,IAAsB;IAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7F,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* set a flag
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
*/
|
|
5
5
|
export declare function set_flag(value: number, mask: number | {
|
|
6
6
|
value: number;
|
|
7
7
|
}): number;
|
|
8
8
|
/**
|
|
9
9
|
* check if a set of bits are set in the values
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
*/
|
|
12
12
|
export declare function check_flag(value: number, mask: number | {
|
|
13
13
|
value: number;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.hrtime = exports.replaceBufferWithHexDump = exports.setDeprecated = exports.getFunctionParameterNames = exports.compare_buffers = exports.get_clock_tick = exports.getObjectClassName = exports.lowerFirstLetter = exports.capitalizeFirstLetter = exports.buffer_ellipsis =
|
|
17
|
+
exports.hrtime = exports.replaceBufferWithHexDump = exports.setDeprecated = exports.getFunctionParameterNames = exports.compare_buffers = exports.get_clock_tick = exports.getObjectClassName = exports.lowerFirstLetter = exports.capitalizeFirstLetter = exports.buffer_ellipsis = void 0;
|
|
18
|
+
exports.set_flag = set_flag;
|
|
19
|
+
exports.check_flag = check_flag;
|
|
20
|
+
exports.isNullOrUndefined = isNullOrUndefined;
|
|
18
21
|
/**
|
|
19
22
|
* @module node-opcua-utils
|
|
20
23
|
*/
|
|
@@ -22,7 +25,7 @@ exports.hrtime = exports.replaceBufferWithHexDump = exports.setDeprecated = expo
|
|
|
22
25
|
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
23
26
|
/**
|
|
24
27
|
* set a flag
|
|
25
|
-
|
|
28
|
+
|
|
26
29
|
*/
|
|
27
30
|
function set_flag(value, mask) {
|
|
28
31
|
if (mask.value) {
|
|
@@ -32,10 +35,9 @@ function set_flag(value, mask) {
|
|
|
32
35
|
(0, node_opcua_assert_1.assert)(mask !== undefined);
|
|
33
36
|
return value | mask;
|
|
34
37
|
}
|
|
35
|
-
exports.set_flag = set_flag;
|
|
36
38
|
/**
|
|
37
39
|
* check if a set of bits are set in the values
|
|
38
|
-
|
|
40
|
+
|
|
39
41
|
*/
|
|
40
42
|
function check_flag(value, mask) {
|
|
41
43
|
if (mask.value) {
|
|
@@ -44,11 +46,9 @@ function check_flag(value, mask) {
|
|
|
44
46
|
(0, node_opcua_assert_1.assert)(!Object.prototype.hasOwnProperty.call(mask, "value"));
|
|
45
47
|
return (value & mask) === mask;
|
|
46
48
|
}
|
|
47
|
-
exports.check_flag = check_flag;
|
|
48
49
|
function isNullOrUndefined(value) {
|
|
49
50
|
return value === undefined || value === null;
|
|
50
51
|
}
|
|
51
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
|
52
52
|
var buffer_ellipsis_1 = require("./buffer_ellipsis");
|
|
53
53
|
Object.defineProperty(exports, "buffer_ellipsis", { enumerable: true, get: function () { return buffer_ellipsis_1.buffer_ellipsis; } });
|
|
54
54
|
var string_utils_1 = require("./string_utils");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAUA,4BAOC;AAKD,gCAMC;AAED,8CAEC;AAhCD;;GAEG;AACH,4BAA4B;AAC5B,yDAA2C;AAE3C;;;GAGG;AACH,SAAgB,QAAQ,CAAC,KAAa,EAAE,IAAgC;IACpE,IAAK,IAAY,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI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|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.matchUri =
|
|
3
|
+
exports.matchUri = matchUri;
|
|
4
4
|
/**
|
|
5
5
|
* @module node-opcua-utils
|
|
6
6
|
*/
|
|
@@ -20,5 +20,4 @@ function matchUri(endpointUri1, endpointUri2) {
|
|
|
20
20
|
}
|
|
21
21
|
return endpointUri1.toLowerCase() === endpointUri2.toLowerCase();
|
|
22
22
|
}
|
|
23
|
-
exports.matchUri = matchUri;
|
|
24
23
|
//# sourceMappingURL=match_uri.js.map
|
package/dist/match_uri.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match_uri.js","sourceRoot":"","sources":["../source/match_uri.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"match_uri.js","sourceRoot":"","sources":["../source/match_uri.ts"],"names":[],"mappings":";;AAUA,4BAQC;AAlBD;;GAEG;AACH;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,YAA2B,EAAE,YAA2B;IAC7E,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,YAAY,KAAK,IAAI,CAAC;IACjC,CAAC;IACD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,YAAY,KAAK,IAAI,CAAC;IACjC,CAAC;IACD,OAAO,YAAY,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,CAAC;AACrE,CAAC"}
|
package/dist/object_classname.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getObjectClassName =
|
|
3
|
+
exports.getObjectClassName = getObjectClassName;
|
|
4
4
|
/**
|
|
5
5
|
* @module node-opcua-utils
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
* @param obj
|
|
10
10
|
* @return {string}
|
|
11
11
|
*/
|
|
12
12
|
function getObjectClassName(obj) {
|
|
13
13
|
return Object.prototype.toString.call(obj).slice(8, -1);
|
|
14
14
|
}
|
|
15
|
-
exports.getObjectClassName = getObjectClassName;
|
|
16
15
|
//# sourceMappingURL=object_classname.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object_classname.js","sourceRoot":"","sources":["../source/object_classname.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object_classname.js","sourceRoot":"","sources":["../source/object_classname.ts"],"names":[],"mappings":";;AAQA,gDAEC;AAVD;;GAEG;AACH;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceBufferWithHexDump =
|
|
3
|
+
exports.replaceBufferWithHexDump = replaceBufferWithHexDump;
|
|
4
4
|
/**
|
|
5
5
|
* @module node-opcua-utils
|
|
6
6
|
*/
|
|
@@ -17,5 +17,4 @@ function replaceBufferWithHexDump(obj) {
|
|
|
17
17
|
}
|
|
18
18
|
return obj;
|
|
19
19
|
}
|
|
20
|
-
exports.replaceBufferWithHexDump = replaceBufferWithHexDump;
|
|
21
20
|
//# sourceMappingURL=replace_buffer_with_hex_dump.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replace_buffer_with_hex_dump.js","sourceRoot":"","sources":["../source/replace_buffer_with_hex_dump.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replace_buffer_with_hex_dump.js","sourceRoot":"","sources":["../source/replace_buffer_with_hex_dump.ts"],"names":[],"mappings":";;AAGA,4DAWC;AAdD;;GAEG;AACH,SAAgB,wBAAwB,CAAC,GAAuD;IAC5F,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;QAClB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;YAC/C,IAAI,GAAG,CAAC,CAAC,CAAC,YAAY,MAAM,EAAE,CAAC;gBAC3B,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;YAC/D,CAAC;iBAAM,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;gBACpC,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
package/dist/set_deprecated.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.setDeprecated =
|
|
6
|
+
exports.setDeprecated = setDeprecated;
|
|
7
7
|
/**
|
|
8
8
|
* @module node-opcua-utils
|
|
9
9
|
*/
|
|
@@ -25,5 +25,4 @@ function setDeprecated(constructor, methodName, helpString) {
|
|
|
25
25
|
return oldMethod.call(this, ...args);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
exports.setDeprecated = setDeprecated;
|
|
29
28
|
//# sourceMappingURL=set_deprecated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set_deprecated.js","sourceRoot":"","sources":["../source/set_deprecated.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"set_deprecated.js","sourceRoot":"","sources":["../source/set_deprecated.ts"],"names":[],"mappings":";;;;;AAUA,sCAkBC;AA5BD;;GAEG;AACH,2BAA2B;AAC3B,kDAA0B;AAC1B,yDAA2C;AAI3C,0BAA0B;AAC1B,SAAgB,aAAa,CAAC,WAA6B,EAAE,UAAkB,EAAE,UAAkB;IAC/F,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEpD,IAAA,0BAAM,EAAC,SAAS,YAAY,QAAQ,EAAE,oBAAoB,GAAG,UAAU,GAAG,kBAAkB,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAE7H,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,UAAU,GAAG,IAAW;QACxD,IAAI,OAAO,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;YACvB,4BAA4B;YAC5B,OAAO,CAAC,GAAG,CACP,eAAK,CAAC,KAAK,CAAC,WAAW,CAAC,EACxB,eAAK,CAAC,KAAK,CAAC,eAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,GAAG,GAAG,UAAU,CAAC,EAAE,oBAAoB,CAAC,CACrF,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,EAAE,CAAC;QACV,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACzC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/string_utils.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export declare function countAlpha(str: string): number;
|
|
|
12
12
|
*
|
|
13
13
|
* lowerFirstLetter convert a OPCUA Identifier to a javascript Identifier
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* **rational**:
|
|
16
17
|
*
|
|
17
18
|
* OPCUA and Javascript use two different rules to build identifiers.
|
|
18
19
|
*
|
|
@@ -41,7 +42,8 @@ export declare function countAlpha(str: string): number;
|
|
|
41
42
|
* will be applied to each of the element of the sequence
|
|
42
43
|
* ( ie: ALM_FlowOutOfTolerance => ALM_flowOutOfTolerance ( ALM=>ALM , FlowOutOfTolerance=>flowOutOfTolerance)
|
|
43
44
|
*
|
|
44
|
-
*
|
|
45
|
+
* **reference**:
|
|
46
|
+
*
|
|
45
47
|
* * https://en.wikipedia.org/wiki/Camel_case
|
|
46
48
|
* * https://en.wikipedia.org/wiki/Hungarian_notation
|
|
47
49
|
* * http://wiki.c2.com/?UnderscoreVersusCapitalAndLowerCaseVariableNaming
|
package/dist/string_utils.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
4
|
+
exports.isUpperCaseChar = isUpperCaseChar;
|
|
5
|
+
exports.isAlpha = isAlpha;
|
|
6
|
+
exports.countUpperCaseSlow = countUpperCaseSlow;
|
|
7
|
+
exports.countAlphaSlow = countAlphaSlow;
|
|
8
|
+
exports.countUpperCase = countUpperCase;
|
|
9
|
+
exports.countAlpha = countAlpha;
|
|
10
|
+
exports.lowerFirstLetter = lowerFirstLetter;
|
|
4
11
|
/**
|
|
5
12
|
* @module node-opcua-utils
|
|
6
13
|
*/
|
|
@@ -11,29 +18,24 @@ function capitalizeFirstLetter(str) {
|
|
|
11
18
|
}
|
|
12
19
|
return str.substring(0, 1).toUpperCase() + str.substring(1);
|
|
13
20
|
}
|
|
14
|
-
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
15
21
|
const ACode = "A".charCodeAt(0);
|
|
16
22
|
const ZCode = "Z".charCodeAt(0);
|
|
17
23
|
function isUpperCaseChar(c) {
|
|
18
24
|
const code = c.charCodeAt(0);
|
|
19
25
|
return code >= ACode && code <= ZCode;
|
|
20
26
|
}
|
|
21
|
-
exports.isUpperCaseChar = isUpperCaseChar;
|
|
22
27
|
const aCode = "a".charCodeAt(0);
|
|
23
28
|
const zCode = "z".charCodeAt(0);
|
|
24
29
|
function isAlpha(c) {
|
|
25
30
|
const code = c.charCodeAt(0);
|
|
26
31
|
return (code >= ACode && code <= ZCode) || (code >= aCode && code <= zCode);
|
|
27
32
|
}
|
|
28
|
-
exports.isAlpha = isAlpha;
|
|
29
33
|
function countUpperCaseSlow(str) {
|
|
30
34
|
return str.split("").reduce((p, c) => p + (isUpperCaseChar(c) ? 1 : 0), 0);
|
|
31
35
|
}
|
|
32
|
-
exports.countUpperCaseSlow = countUpperCaseSlow;
|
|
33
36
|
function countAlphaSlow(str) {
|
|
34
37
|
return str.split("").reduce((p, c) => p + (isAlpha(c) ? 1 : 0), 0);
|
|
35
38
|
}
|
|
36
|
-
exports.countAlphaSlow = countAlphaSlow;
|
|
37
39
|
function countUpperCase(str) {
|
|
38
40
|
let count = 0;
|
|
39
41
|
const n = str.length;
|
|
@@ -42,7 +44,6 @@ function countUpperCase(str) {
|
|
|
42
44
|
}
|
|
43
45
|
return count;
|
|
44
46
|
}
|
|
45
|
-
exports.countUpperCase = countUpperCase;
|
|
46
47
|
function countAlpha(str) {
|
|
47
48
|
let count = 0;
|
|
48
49
|
const n = str.length;
|
|
@@ -51,12 +52,12 @@ function countAlpha(str) {
|
|
|
51
52
|
}
|
|
52
53
|
return count;
|
|
53
54
|
}
|
|
54
|
-
exports.countAlpha = countAlpha;
|
|
55
55
|
/**
|
|
56
56
|
*
|
|
57
57
|
* lowerFirstLetter convert a OPCUA Identifier to a javascript Identifier
|
|
58
58
|
*
|
|
59
|
-
*
|
|
59
|
+
*
|
|
60
|
+
* **rational**:
|
|
60
61
|
*
|
|
61
62
|
* OPCUA and Javascript use two different rules to build identifiers.
|
|
62
63
|
*
|
|
@@ -85,7 +86,8 @@ exports.countAlpha = countAlpha;
|
|
|
85
86
|
* will be applied to each of the element of the sequence
|
|
86
87
|
* ( ie: ALM_FlowOutOfTolerance => ALM_flowOutOfTolerance ( ALM=>ALM , FlowOutOfTolerance=>flowOutOfTolerance)
|
|
87
88
|
*
|
|
88
|
-
*
|
|
89
|
+
* **reference**:
|
|
90
|
+
*
|
|
89
91
|
* * https://en.wikipedia.org/wiki/Camel_case
|
|
90
92
|
* * https://en.wikipedia.org/wiki/Hungarian_notation
|
|
91
93
|
* * http://wiki.c2.com/?UnderscoreVersusCapitalAndLowerCaseVariableNaming
|
|
@@ -124,5 +126,4 @@ function lowerFirstLetter(str) {
|
|
|
124
126
|
}
|
|
125
127
|
return result;
|
|
126
128
|
}
|
|
127
|
-
exports.lowerFirstLetter = lowerFirstLetter;
|
|
128
129
|
//# sourceMappingURL=string_utils.js.map
|
package/dist/string_utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string_utils.js","sourceRoot":"","sources":["../source/string_utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"string_utils.js","sourceRoot":"","sources":["../source/string_utils.ts"],"names":[],"mappings":";;AAIA,sDAKC;AAID,0CAGC;AAGD,0BAGC;AAED,gDAEC;AACD,wCAEC;AAED,wCAOC;AACD,gCAOC;AA2DD,4CAiBC;AA1HD;;GAEG;AACH,+BAA+B;AAC/B,SAAgB,qBAAqB,CAAC,GAAW;IAC7C,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACd,OAAO,GAAG,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,SAAgB,eAAe,CAAC,CAAS;IACrC,MAAM,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC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GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/dist/timestamp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.timestamp =
|
|
3
|
+
exports.timestamp = timestamp;
|
|
4
4
|
function w(s, length) {
|
|
5
5
|
return ("" + s).padStart(length, "0");
|
|
6
6
|
}
|
|
@@ -10,5 +10,4 @@ function t(d) {
|
|
|
10
10
|
function timestamp() {
|
|
11
11
|
return t(new Date());
|
|
12
12
|
}
|
|
13
|
-
exports.timestamp = timestamp;
|
|
14
13
|
//# sourceMappingURL=timestamp.js.map
|
package/dist/timestamp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../source/timestamp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../source/timestamp.ts"],"names":[],"mappings":";;AAQA,8BAEC;AAVD,SAAS,CAAC,CAAC,CAAkB,EAAE,MAAc;IACzC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,CAAC,CAAC,CAAO;IACd,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;AACnI,CAAC;AAED,SAAgB,SAAS;IACrB,OAAO,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/watchdog.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
/**
|
|
3
2
|
* @module node-opcua-utils
|
|
4
3
|
*/
|
|
@@ -34,7 +33,7 @@ export declare class WatchDog extends EventEmitter {
|
|
|
34
33
|
constructor();
|
|
35
34
|
/**
|
|
36
35
|
* add a subscriber to the WatchDog.
|
|
37
|
-
|
|
36
|
+
|
|
38
37
|
*
|
|
39
38
|
* add a subscriber to the WatchDog.
|
|
40
39
|
*
|
package/dist/watchdog.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module utils",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
"chalk": "4.1.2",
|
|
16
16
|
"node-opcua-assert": "2.120.0"
|
|
17
17
|
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"should": "^13.2.3",
|
|
20
|
-
"sinon": "^18.0.0"
|
|
21
|
-
},
|
|
22
18
|
"author": "Etienne Rossignon",
|
|
23
19
|
"license": "MIT",
|
|
24
20
|
"repository": {
|
|
@@ -34,7 +30,7 @@
|
|
|
34
30
|
"internet of things"
|
|
35
31
|
],
|
|
36
32
|
"homepage": "http://node-opcua.github.io/",
|
|
37
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "921bb04f2e7ce3109dd051ff27a2210edf700344",
|
|
38
34
|
"files": [
|
|
39
35
|
"dist",
|
|
40
36
|
"source"
|
package/source/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { assert } from "node-opcua-assert";
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* set a flag
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
*/
|
|
11
11
|
export function set_flag(value: number, mask: number | { value: number }): number {
|
|
12
12
|
if ((mask as any).value) {
|
|
@@ -18,7 +18,7 @@ export function set_flag(value: number, mask: number | { value: number }): numbe
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* check if a set of bits are set in the values
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
*/
|
|
23
23
|
export function check_flag(value: number, mask: number | { value: number }): boolean {
|
|
24
24
|
if ((mask as any).value) {
|
package/source/string_utils.ts
CHANGED
|
@@ -50,8 +50,9 @@ export function countAlpha(str: string): number {
|
|
|
50
50
|
*
|
|
51
51
|
* lowerFirstLetter convert a OPCUA Identifier to a javascript Identifier
|
|
52
52
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
*
|
|
54
|
+
* **rational**:
|
|
55
|
+
*
|
|
55
56
|
* OPCUA and Javascript use two different rules to build identifiers.
|
|
56
57
|
*
|
|
57
58
|
* OPCUA Identifier usually starts with a upper case letter and word are join together, this is known as
|
|
@@ -79,7 +80,8 @@ export function countAlpha(str: string): number {
|
|
|
79
80
|
* will be applied to each of the element of the sequence
|
|
80
81
|
* ( ie: ALM_FlowOutOfTolerance => ALM_flowOutOfTolerance ( ALM=>ALM , FlowOutOfTolerance=>flowOutOfTolerance)
|
|
81
82
|
*
|
|
82
|
-
*
|
|
83
|
+
* **reference**:
|
|
84
|
+
*
|
|
83
85
|
* * https://en.wikipedia.org/wiki/Camel_case
|
|
84
86
|
* * https://en.wikipedia.org/wiki/Hungarian_notation
|
|
85
87
|
* * http://wiki.c2.com/?UnderscoreVersusCapitalAndLowerCaseVariableNaming
|