node-opcua-utils 2.82.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
|
-
|
|
12
|
-
if (result
|
|
13
|
-
|
|
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,
|
|
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.
|
|
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",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"should": "^13.2.3",
|
|
20
|
-
"sinon": "^14.0.
|
|
20
|
+
"sinon": "^14.0.2"
|
|
21
21
|
},
|
|
22
22
|
"author": "Etienne Rossignon",
|
|
23
23
|
"license": "MIT",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"internet of things"
|
|
35
35
|
],
|
|
36
36
|
"homepage": "http://node-opcua.github.io/",
|
|
37
|
-
"gitHead": "
|
|
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
|
-
|
|
11
|
-
if (result
|
|
12
|
-
|
|
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
|
}
|