node-opcua-utils 2.76.0 → 2.82.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.
@@ -1,5 +1,5 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-utils
4
- */
5
- export declare function buffer_ellipsis(buffer: Buffer, start?: number, end?: number): string;
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-utils
4
+ */
5
+ export declare function buffer_ellipsis(buffer: Buffer, start?: number, end?: number): string;
@@ -1,17 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buffer_ellipsis = void 0;
4
- /**
5
- * @module node-opcua-utils
6
- */
7
- function buffer_ellipsis(buffer, start, end) {
8
- start = start || 0;
9
- end = end || buffer.length;
10
- if (end - start < 40) {
11
- return buffer.slice(start, end).toString("hex");
12
- }
13
- return buffer.slice(start, start + 10).toString("hex") + " ... " + buffer.slice(end - 10, end).toString("hex");
14
- }
15
- exports.buffer_ellipsis = buffer_ellipsis;
16
- exports.buffer_ellipsis = buffer_ellipsis;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buffer_ellipsis = void 0;
4
+ /**
5
+ * @module node-opcua-utils
6
+ */
7
+ function buffer_ellipsis(buffer, start, end) {
8
+ start = start || 0;
9
+ end = end || buffer.length;
10
+ if (end - start < 40) {
11
+ return buffer.slice(start, end).toString("hex");
12
+ }
13
+ return buffer.slice(start, start + 10).toString("hex") + " ... " + buffer.slice(end - 10, end).toString("hex");
14
+ }
15
+ exports.buffer_ellipsis = buffer_ellipsis;
16
+ exports.buffer_ellipsis = buffer_ellipsis;
17
17
  //# sourceMappingURL=buffer_ellipsis.js.map
@@ -1,2 +1,2 @@
1
- /// <reference types="node" />
2
- export declare function compare_buffers(buf1: Buffer, buf2: Buffer, max_length?: number): void;
1
+ /// <reference types="node" />
2
+ export declare function compare_buffers(buf1: Buffer, buf2: Buffer, max_length?: number): void;
@@ -1,27 +1,27 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compare_buffers = void 0;
4
- /**
5
- * @module node-opcua-utils
6
- */
7
- // tslint:disable:no-console
8
- const chalk = require("chalk");
9
- const buffer_ellipsis_1 = require("./buffer_ellipsis");
10
- function compare_buffers(buf1, buf2, max_length) {
11
- max_length = max_length || buf2.length;
12
- const block_length = 80;
13
- let cursor = 0;
14
- while (cursor < max_length) {
15
- const slice1 = buf1.slice(cursor, cursor + block_length);
16
- const slice2 = buf2.slice(cursor, cursor + block_length);
17
- if (slice2.toString("hex") !== slice1.toString("hex")) {
18
- console.log("pos = ", cursor);
19
- console.log("slice1 :", chalk.yellow((0, buffer_ellipsis_1.buffer_ellipsis)(slice1)));
20
- console.log("slice2 :", chalk.blue((0, buffer_ellipsis_1.buffer_ellipsis)(slice2)));
21
- }
22
- cursor += block_length;
23
- }
24
- // xx buf1.length.should.equal(max_length);
25
- }
26
- exports.compare_buffers = compare_buffers;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compare_buffers = void 0;
4
+ /**
5
+ * @module node-opcua-utils
6
+ */
7
+ // tslint:disable:no-console
8
+ const chalk = require("chalk");
9
+ const buffer_ellipsis_1 = require("./buffer_ellipsis");
10
+ function compare_buffers(buf1, buf2, max_length) {
11
+ max_length = max_length || buf2.length;
12
+ const block_length = 80;
13
+ let cursor = 0;
14
+ while (cursor < max_length) {
15
+ const slice1 = buf1.slice(cursor, cursor + block_length);
16
+ const slice2 = buf2.slice(cursor, cursor + block_length);
17
+ if (slice2.toString("hex") !== slice1.toString("hex")) {
18
+ console.log("pos = ", cursor);
19
+ console.log("slice1 :", chalk.yellow((0, buffer_ellipsis_1.buffer_ellipsis)(slice1)));
20
+ console.log("slice2 :", chalk.blue((0, buffer_ellipsis_1.buffer_ellipsis)(slice2)));
21
+ }
22
+ cursor += block_length;
23
+ }
24
+ // xx buf1.length.should.equal(max_length);
25
+ }
26
+ exports.compare_buffers = compare_buffers;
27
27
  //# sourceMappingURL=compare_buffers.js.map
@@ -1 +1 @@
1
- export declare type FunctionVariadic = (...args: any[]) => void;
1
+ export declare type FunctionVariadic = (...args: any[]) => void;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=function_variadic.js.map
@@ -1,4 +1,4 @@
1
- /**
2
- * @module node-opcua-utils
3
- */
4
- export declare let get_clock_tick: () => number;
1
+ /**
2
+ * @module node-opcua-utils
3
+ */
4
+ export declare let get_clock_tick: () => number;
@@ -1,17 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.get_clock_tick = void 0;
4
- if (typeof process === "object" && process.hrtime) {
5
- const tickOrigin = process.hrtime();
6
- // clock it as a double in millisecond
7
- // so we can measure very tiny time intervals
8
- exports.get_clock_tick = () => {
9
- const hrt = process.hrtime(tickOrigin);
10
- const r = (hrt[0]) * 1000.0 + Math.ceil((hrt[1] / 1e6) * 1000) / 1000;
11
- return r;
12
- };
13
- }
14
- else {
15
- exports.get_clock_tick = () => Date.now();
16
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.get_clock_tick = void 0;
4
+ if (typeof process === "object" && process.hrtime) {
5
+ const tickOrigin = process.hrtime();
6
+ // clock it as a double in millisecond
7
+ // so we can measure very tiny time intervals
8
+ exports.get_clock_tick = () => {
9
+ const hrt = process.hrtime(tickOrigin);
10
+ const r = (hrt[0]) * 1000.0 + Math.ceil((hrt[1] / 1e6) * 1000) / 1000;
11
+ return r;
12
+ };
13
+ }
14
+ else {
15
+ exports.get_clock_tick = () => Date.now();
16
+ }
17
17
  //# sourceMappingURL=get_clock_tick.js.map
@@ -1,2 +1,2 @@
1
- import { FunctionVariadic } from "./function_variadic";
2
- export declare function getFunctionParameterNames(func: FunctionVariadic): string[];
1
+ import { FunctionVariadic } from "./function_variadic";
2
+ export declare function getFunctionParameterNames(func: FunctionVariadic): string[];
@@ -1,18 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFunctionParameterNames = void 0;
4
- /**
5
- * @module node-opcua-utils
6
- */
7
- const STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;
8
- const ARGUMENT_NAMES = /([^\s,]+)/g;
9
- function getFunctionParameterNames(func) {
10
- const fnStr = func.toString().replace(STRIP_COMMENTS, "");
11
- let result = fnStr.slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")")).match(ARGUMENT_NAMES);
12
- if (result === null) {
13
- result = [];
14
- }
15
- return result;
16
- }
17
- exports.getFunctionParameterNames = getFunctionParameterNames;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFunctionParameterNames = void 0;
4
+ /**
5
+ * @module node-opcua-utils
6
+ */
7
+ const STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;
8
+ const ARGUMENT_NAMES = /([^\s,]+)/g;
9
+ function getFunctionParameterNames(func) {
10
+ const fnStr = func.toString().replace(STRIP_COMMENTS, "");
11
+ let result = fnStr.slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")")).match(ARGUMENT_NAMES);
12
+ if (result === null) {
13
+ result = [];
14
+ }
15
+ return result;
16
+ }
17
+ exports.getFunctionParameterNames = getFunctionParameterNames;
18
18
  //# sourceMappingURL=get_function_parameters_name.js.map
package/dist/hrtime.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare type HRTimeFunc = (time?: [number, number]) => [number, number];
2
- export declare const hrtime: HRTimeFunc;
1
+ export declare type HRTimeFunc = (time?: [number, number]) => [number, number];
2
+ export declare const hrtime: HRTimeFunc;
package/dist/hrtime.js CHANGED
@@ -1,32 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hrtime = void 0;
4
- // polyfil for window.performance.now
5
- const performance = (typeof global === "object" && global.performance) || {};
6
- const performanceNow = performance.now ||
7
- performance.mozNow ||
8
- performance.msNow ||
9
- performance.oNow ||
10
- performance.webkitNow ||
11
- function () {
12
- return new Date().getTime();
13
- };
14
- // generate timestamp or delta
15
- // see http://nodejs.org/api/process.html#process_process_hrtime
16
- function hrtime_for_browser(previousTimestamp) {
17
- previousTimestamp = previousTimestamp || [0, 0];
18
- const clocktime = performanceNow.call(performance) * 1e-3;
19
- let seconds = Math.floor(clocktime);
20
- let nanoseconds = Math.floor((clocktime % 1) * 1e9);
21
- if (previousTimestamp) {
22
- seconds = seconds - previousTimestamp[0];
23
- nanoseconds = nanoseconds - previousTimestamp[1];
24
- if (nanoseconds < 0) {
25
- seconds--;
26
- nanoseconds += 1e9;
27
- }
28
- }
29
- return [seconds, nanoseconds];
30
- }
31
- exports.hrtime = typeof process === "object" ? (process.hrtime || hrtime_for_browser) : hrtime_for_browser;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hrtime = void 0;
4
+ // polyfil for window.performance.now
5
+ const performance = (typeof global === "object" && global.performance) || {};
6
+ const performanceNow = performance.now ||
7
+ performance.mozNow ||
8
+ performance.msNow ||
9
+ performance.oNow ||
10
+ performance.webkitNow ||
11
+ function () {
12
+ return new Date().getTime();
13
+ };
14
+ // generate timestamp or delta
15
+ // see http://nodejs.org/api/process.html#process_process_hrtime
16
+ function hrtime_for_browser(previousTimestamp) {
17
+ previousTimestamp = previousTimestamp || [0, 0];
18
+ const clocktime = performanceNow.call(performance) * 1e-3;
19
+ let seconds = Math.floor(clocktime);
20
+ let nanoseconds = Math.floor((clocktime % 1) * 1e9);
21
+ if (previousTimestamp) {
22
+ seconds = seconds - previousTimestamp[0];
23
+ nanoseconds = nanoseconds - previousTimestamp[1];
24
+ if (nanoseconds < 0) {
25
+ seconds--;
26
+ nanoseconds += 1e9;
27
+ }
28
+ }
29
+ return [seconds, nanoseconds];
30
+ }
31
+ exports.hrtime = typeof process === "object" ? (process.hrtime || hrtime_for_browser) : hrtime_for_browser;
32
32
  //# sourceMappingURL=hrtime.js.map
package/dist/index.d.ts CHANGED
@@ -1,28 +1,28 @@
1
- /**
2
- * set a flag
3
- * @method set_flag
4
- */
5
- export declare function set_flag(value: number, mask: number | {
6
- value: number;
7
- }): number;
8
- /**
9
- * check if a set of bits are set in the values
10
- * @method check_flag
11
- */
12
- export declare function check_flag(value: number, mask: number | {
13
- value: number;
14
- }): boolean;
15
- export declare function isNullOrUndefined(value: unknown | undefined): boolean;
16
- export { buffer_ellipsis } from "./buffer_ellipsis";
17
- export { capitalizeFirstLetter, lowerFirstLetter } from "./string_utils";
18
- export { getObjectClassName } from "./object_classname";
19
- export { get_clock_tick } from "./get_clock_tick";
20
- export { compare_buffers } from "./compare_buffers";
21
- export { getFunctionParameterNames } from "./get_function_parameters_name";
22
- export * from "./watchdog";
23
- export { setDeprecated } from "./set_deprecated";
24
- export { replaceBufferWithHexDump } from "./replace_buffer_with_hex_dump";
25
- export * from "./timestamp";
26
- export * from "./line_file";
27
- export * from "./match_uri";
28
- export { hrtime } from "./hrtime";
1
+ /**
2
+ * set a flag
3
+ * @method set_flag
4
+ */
5
+ export declare function set_flag(value: number, mask: number | {
6
+ value: number;
7
+ }): number;
8
+ /**
9
+ * check if a set of bits are set in the values
10
+ * @method check_flag
11
+ */
12
+ export declare function check_flag(value: number, mask: number | {
13
+ value: number;
14
+ }): boolean;
15
+ export declare function isNullOrUndefined(value: unknown | undefined): boolean;
16
+ export { buffer_ellipsis } from "./buffer_ellipsis";
17
+ export { capitalizeFirstLetter, lowerFirstLetter } from "./string_utils";
18
+ export { getObjectClassName } from "./object_classname";
19
+ export { get_clock_tick } from "./get_clock_tick";
20
+ export { compare_buffers } from "./compare_buffers";
21
+ export { getFunctionParameterNames } from "./get_function_parameters_name";
22
+ export * from "./watchdog";
23
+ export { setDeprecated } from "./set_deprecated";
24
+ export { replaceBufferWithHexDump } from "./replace_buffer_with_hex_dump";
25
+ export * from "./timestamp";
26
+ export * from "./line_file";
27
+ export * from "./match_uri";
28
+ export { hrtime } from "./hrtime";
package/dist/index.js CHANGED
@@ -1,75 +1,75 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
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 = exports.isNullOrUndefined = exports.check_flag = exports.set_flag = void 0;
18
- /**
19
- * @module node-opcua-utils
20
- */
21
- // tslint:disable:no-bitwise
22
- const node_opcua_assert_1 = require("node-opcua-assert");
23
- /**
24
- * set a flag
25
- * @method set_flag
26
- */
27
- function set_flag(value, mask) {
28
- if (mask.value) {
29
- mask = mask.value;
30
- }
31
- (0, node_opcua_assert_1.assert)(!Object.prototype.hasOwnProperty.call(mask, "value"));
32
- (0, node_opcua_assert_1.assert)(mask !== undefined);
33
- return value | mask;
34
- }
35
- exports.set_flag = set_flag;
36
- /**
37
- * check if a set of bits are set in the values
38
- * @method check_flag
39
- */
40
- function check_flag(value, mask) {
41
- if (mask.value) {
42
- mask = mask.value;
43
- }
44
- (0, node_opcua_assert_1.assert)(!Object.prototype.hasOwnProperty.call(mask, "value"));
45
- return (value & mask) === mask;
46
- }
47
- exports.check_flag = check_flag;
48
- function isNullOrUndefined(value) {
49
- return value === undefined || value === null;
50
- }
51
- exports.isNullOrUndefined = isNullOrUndefined;
52
- var buffer_ellipsis_1 = require("./buffer_ellipsis");
53
- Object.defineProperty(exports, "buffer_ellipsis", { enumerable: true, get: function () { return buffer_ellipsis_1.buffer_ellipsis; } });
54
- var string_utils_1 = require("./string_utils");
55
- Object.defineProperty(exports, "capitalizeFirstLetter", { enumerable: true, get: function () { return string_utils_1.capitalizeFirstLetter; } });
56
- Object.defineProperty(exports, "lowerFirstLetter", { enumerable: true, get: function () { return string_utils_1.lowerFirstLetter; } });
57
- var object_classname_1 = require("./object_classname");
58
- Object.defineProperty(exports, "getObjectClassName", { enumerable: true, get: function () { return object_classname_1.getObjectClassName; } });
59
- var get_clock_tick_1 = require("./get_clock_tick");
60
- Object.defineProperty(exports, "get_clock_tick", { enumerable: true, get: function () { return get_clock_tick_1.get_clock_tick; } });
61
- var compare_buffers_1 = require("./compare_buffers");
62
- Object.defineProperty(exports, "compare_buffers", { enumerable: true, get: function () { return compare_buffers_1.compare_buffers; } });
63
- var get_function_parameters_name_1 = require("./get_function_parameters_name");
64
- Object.defineProperty(exports, "getFunctionParameterNames", { enumerable: true, get: function () { return get_function_parameters_name_1.getFunctionParameterNames; } });
65
- __exportStar(require("./watchdog"), exports);
66
- var set_deprecated_1 = require("./set_deprecated");
67
- Object.defineProperty(exports, "setDeprecated", { enumerable: true, get: function () { return set_deprecated_1.setDeprecated; } });
68
- var replace_buffer_with_hex_dump_1 = require("./replace_buffer_with_hex_dump");
69
- Object.defineProperty(exports, "replaceBufferWithHexDump", { enumerable: true, get: function () { return replace_buffer_with_hex_dump_1.replaceBufferWithHexDump; } });
70
- __exportStar(require("./timestamp"), exports);
71
- __exportStar(require("./line_file"), exports);
72
- __exportStar(require("./match_uri"), exports);
73
- var hrtime_1 = require("./hrtime");
74
- Object.defineProperty(exports, "hrtime", { enumerable: true, get: function () { return hrtime_1.hrtime; } });
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
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 = exports.isNullOrUndefined = exports.check_flag = exports.set_flag = void 0;
18
+ /**
19
+ * @module node-opcua-utils
20
+ */
21
+ // tslint:disable:no-bitwise
22
+ const node_opcua_assert_1 = require("node-opcua-assert");
23
+ /**
24
+ * set a flag
25
+ * @method set_flag
26
+ */
27
+ function set_flag(value, mask) {
28
+ if (mask.value) {
29
+ mask = mask.value;
30
+ }
31
+ (0, node_opcua_assert_1.assert)(!Object.prototype.hasOwnProperty.call(mask, "value"));
32
+ (0, node_opcua_assert_1.assert)(mask !== undefined);
33
+ return value | mask;
34
+ }
35
+ exports.set_flag = set_flag;
36
+ /**
37
+ * check if a set of bits are set in the values
38
+ * @method check_flag
39
+ */
40
+ function check_flag(value, mask) {
41
+ if (mask.value) {
42
+ mask = mask.value;
43
+ }
44
+ (0, node_opcua_assert_1.assert)(!Object.prototype.hasOwnProperty.call(mask, "value"));
45
+ return (value & mask) === mask;
46
+ }
47
+ exports.check_flag = check_flag;
48
+ function isNullOrUndefined(value) {
49
+ return value === undefined || value === null;
50
+ }
51
+ exports.isNullOrUndefined = isNullOrUndefined;
52
+ var buffer_ellipsis_1 = require("./buffer_ellipsis");
53
+ Object.defineProperty(exports, "buffer_ellipsis", { enumerable: true, get: function () { return buffer_ellipsis_1.buffer_ellipsis; } });
54
+ var string_utils_1 = require("./string_utils");
55
+ Object.defineProperty(exports, "capitalizeFirstLetter", { enumerable: true, get: function () { return string_utils_1.capitalizeFirstLetter; } });
56
+ Object.defineProperty(exports, "lowerFirstLetter", { enumerable: true, get: function () { return string_utils_1.lowerFirstLetter; } });
57
+ var object_classname_1 = require("./object_classname");
58
+ Object.defineProperty(exports, "getObjectClassName", { enumerable: true, get: function () { return object_classname_1.getObjectClassName; } });
59
+ var get_clock_tick_1 = require("./get_clock_tick");
60
+ Object.defineProperty(exports, "get_clock_tick", { enumerable: true, get: function () { return get_clock_tick_1.get_clock_tick; } });
61
+ var compare_buffers_1 = require("./compare_buffers");
62
+ Object.defineProperty(exports, "compare_buffers", { enumerable: true, get: function () { return compare_buffers_1.compare_buffers; } });
63
+ var get_function_parameters_name_1 = require("./get_function_parameters_name");
64
+ Object.defineProperty(exports, "getFunctionParameterNames", { enumerable: true, get: function () { return get_function_parameters_name_1.getFunctionParameterNames; } });
65
+ __exportStar(require("./watchdog"), exports);
66
+ var set_deprecated_1 = require("./set_deprecated");
67
+ Object.defineProperty(exports, "setDeprecated", { enumerable: true, get: function () { return set_deprecated_1.setDeprecated; } });
68
+ var replace_buffer_with_hex_dump_1 = require("./replace_buffer_with_hex_dump");
69
+ Object.defineProperty(exports, "replaceBufferWithHexDump", { enumerable: true, get: function () { return replace_buffer_with_hex_dump_1.replaceBufferWithHexDump; } });
70
+ __exportStar(require("./timestamp"), exports);
71
+ __exportStar(require("./line_file"), exports);
72
+ __exportStar(require("./match_uri"), exports);
73
+ var hrtime_1 = require("./hrtime");
74
+ Object.defineProperty(exports, "hrtime", { enumerable: true, get: function () { return hrtime_1.hrtime; } });
75
75
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
- /**
2
- * @module node-opcua-utils
3
- */
4
- export declare class LineFile {
5
- private _line;
6
- constructor();
7
- write(...args: string[]): void;
8
- toString(endOfLine?: "\n" | "\r"): string;
9
- }
1
+ /**
2
+ * @module node-opcua-utils
3
+ */
4
+ export declare class LineFile {
5
+ private _line;
6
+ constructor();
7
+ write(...args: string[]): void;
8
+ toString(endOfLine?: "\n" | "\r"): string;
9
+ }
package/dist/line_file.js CHANGED
@@ -1,24 +1,24 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-utils
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LineFile = void 0;
7
- class LineFile {
8
- constructor() {
9
- this._line = [];
10
- }
11
- write(...args) {
12
- let str = "";
13
- // tslint:disable:prefer-for-of
14
- for (let i = 0; i < args.length; i++) {
15
- str += args[i];
16
- }
17
- this._line.push(str);
18
- }
19
- toString(endOfLine = "\n") {
20
- return this._line.join(endOfLine);
21
- }
22
- }
23
- exports.LineFile = LineFile;
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-utils
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LineFile = void 0;
7
+ class LineFile {
8
+ constructor() {
9
+ this._line = [];
10
+ }
11
+ write(...args) {
12
+ let str = "";
13
+ // tslint:disable:prefer-for-of
14
+ for (let i = 0; i < args.length; i++) {
15
+ str += args[i];
16
+ }
17
+ this._line.push(str);
18
+ }
19
+ toString(endOfLine = "\n") {
20
+ return this._line.join(endOfLine);
21
+ }
22
+ }
23
+ exports.LineFile = LineFile;
24
24
  //# sourceMappingURL=line_file.js.map
@@ -1,11 +1,11 @@
1
- /**
2
- * @module node-opcua-utils
3
- */
4
- /**
5
- * returns true if two endpoint matches the same address:
6
- *
7
- * @see https://www.dnscheck.co/faq
8
- * @see https://tools.ietf.org/html/rfc4343 : Domain Name System (DNS) Case Insensitivity Clarification
9
- *
10
- */
11
- export declare function matchUri(endpointUri1: string | null, endpointUri2: string | null): boolean;
1
+ /**
2
+ * @module node-opcua-utils
3
+ */
4
+ /**
5
+ * returns true if two endpoint matches the same address:
6
+ *
7
+ * @see https://www.dnscheck.co/faq
8
+ * @see https://tools.ietf.org/html/rfc4343 : Domain Name System (DNS) Case Insensitivity Clarification
9
+ *
10
+ */
11
+ export declare function matchUri(endpointUri1: string | null, endpointUri2: string | null): boolean;
package/dist/match_uri.js CHANGED
@@ -1,24 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchUri = void 0;
4
- /**
5
- * @module node-opcua-utils
6
- */
7
- /**
8
- * returns true if two endpoint matches the same address:
9
- *
10
- * @see https://www.dnscheck.co/faq
11
- * @see https://tools.ietf.org/html/rfc4343 : Domain Name System (DNS) Case Insensitivity Clarification
12
- *
13
- */
14
- function matchUri(endpointUri1, endpointUri2) {
15
- if (endpointUri1 === null) {
16
- return endpointUri2 === null;
17
- }
18
- if (endpointUri2 === null) {
19
- return endpointUri1 === null;
20
- }
21
- return endpointUri1.toLowerCase() === endpointUri2.toLowerCase();
22
- }
23
- exports.matchUri = matchUri;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matchUri = void 0;
4
+ /**
5
+ * @module node-opcua-utils
6
+ */
7
+ /**
8
+ * returns true if two endpoint matches the same address:
9
+ *
10
+ * @see https://www.dnscheck.co/faq
11
+ * @see https://tools.ietf.org/html/rfc4343 : Domain Name System (DNS) Case Insensitivity Clarification
12
+ *
13
+ */
14
+ function matchUri(endpointUri1, endpointUri2) {
15
+ if (endpointUri1 === null) {
16
+ return endpointUri2 === null;
17
+ }
18
+ if (endpointUri2 === null) {
19
+ return endpointUri1 === null;
20
+ }
21
+ return endpointUri1.toLowerCase() === endpointUri2.toLowerCase();
22
+ }
23
+ exports.matchUri = matchUri;
24
24
  //# sourceMappingURL=match_uri.js.map
@@ -1,9 +1,9 @@
1
- /**
2
- * @module node-opcua-utils
3
- */
4
- /**
5
- * @method getObjectClassName
6
- * @param obj
7
- * @return {string}
8
- */
9
- export declare function getObjectClassName(obj: unknown): string;
1
+ /**
2
+ * @module node-opcua-utils
3
+ */
4
+ /**
5
+ * @method getObjectClassName
6
+ * @param obj
7
+ * @return {string}
8
+ */
9
+ export declare function getObjectClassName(obj: unknown): string;