node-opcua-utils 2.83.0 → 2.85.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.
@@ -8,9 +8,9 @@ const STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;
8
8
  const ARGUMENT_NAMES = /([^\s,]+)/g;
9
9
  function getFunctionParameterNames(func) {
10
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 = [];
11
+ const result = fnStr.slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")")).match(ARGUMENT_NAMES);
12
+ if (!result) {
13
+ return [];
14
14
  }
15
15
  return result;
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get_function_parameters_name.js","sourceRoot":"","sources":["../source/get_function_parameters_name.ts"],"names":[],"mappings":";;;AAAA;;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,IAAI,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;IAC3F,IAAI,MAAM,KAAK,IAAI,EAAE;QACjB,MAAM,GAAG,EAAE,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAPD,8DAOC"}
1
+ {"version":3,"file":"get_function_parameters_name.js","sourceRoot":"","sources":["../source/get_function_parameters_name.ts"],"names":[],"mappings":";;;AAAA;;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;QACT,OAAO,EAAE,CAAC;KACb;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAPD,8DAOC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-utils",
3
- "version": "2.83.0",
3
+ "version": "2.85.0",
4
4
  "description": "pure nodejs OPCUA SDK - module -utils",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -34,5 +34,5 @@
34
34
  "internet of things"
35
35
  ],
36
36
  "homepage": "http://node-opcua.github.io/",
37
- "gitHead": "3311f8ce9e86837fde72e923f3121072008ccdd4"
37
+ "gitHead": "68498fcf7b20ea9f7bd66e8529c546221daf5d52"
38
38
  }
@@ -7,9 +7,9 @@ import { FunctionVariadic } from "./function_variadic";
7
7
 
8
8
  export function getFunctionParameterNames(func: FunctionVariadic): string[] {
9
9
  const fnStr = func.toString().replace(STRIP_COMMENTS, "");
10
- let result = fnStr.slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")")).match(ARGUMENT_NAMES);
11
- if (result === null) {
12
- result = [];
10
+ const result = fnStr.slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")")).match(ARGUMENT_NAMES);
11
+ if (!result) {
12
+ return [];
13
13
  }
14
14
  return result;
15
15
  }