@node-red/util 2.2.2 → 3.0.0-beta.3
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/lib/util.js +6 -1
- package/package.json +4 -3
package/lib/util.js
CHANGED
|
@@ -641,7 +641,12 @@ function evaluateNodeProperty(value, type, node, msg, callback) {
|
|
|
641
641
|
result = Date.now();
|
|
642
642
|
} else if (type === 'bin') {
|
|
643
643
|
var data = JSON.parse(value);
|
|
644
|
-
|
|
644
|
+
if (Array.isArray(data) || (typeof(data) === "string")) {
|
|
645
|
+
result = Buffer.from(data);
|
|
646
|
+
}
|
|
647
|
+
else {
|
|
648
|
+
throw createError("INVALID_BUFFER_DATA", "Not string or array");
|
|
649
|
+
}
|
|
645
650
|
} else if (type === 'msg' && msg) {
|
|
646
651
|
try {
|
|
647
652
|
result = getMessageProperty(msg,value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-red/util",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"fs-extra": "10.
|
|
19
|
-
"i18next": "21.
|
|
18
|
+
"fs-extra": "10.1.0",
|
|
19
|
+
"i18next": "21.8.10",
|
|
20
20
|
"json-stringify-safe": "5.0.1",
|
|
21
21
|
"jsonata": "1.8.6",
|
|
22
22
|
"lodash.clonedeep": "^4.5.0",
|
|
23
|
+
"moment": "2.29.3",
|
|
23
24
|
"moment-timezone": "0.5.34"
|
|
24
25
|
}
|
|
25
26
|
}
|