mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add $env function to JSONata expressions
This commit is contained in:
@@ -359,6 +359,9 @@ function prepareJSONataExpression(value,node) {
|
||||
expr.assign('globalContext',function(val) {
|
||||
return node.context().global.get(val);
|
||||
});
|
||||
expr.assign('env', function(val) {
|
||||
return process.env[val];
|
||||
})
|
||||
expr.registerFunction('clone', cloneMessage, '<(oa)-:o>');
|
||||
expr._legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(value);
|
||||
return expr;
|
||||
|
Reference in New Issue
Block a user