mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update jsonata
This commit is contained in:
parent
834e894b1d
commit
5c2e7ce407
4
editor/vendor/jsonata/formatter.js
vendored
4
editor/vendor/jsonata/formatter.js
vendored
@ -110,6 +110,7 @@
|
||||
'$append':{ args:['array','array'] },
|
||||
'$average':{ args:['value'] },
|
||||
'$boolean':{ args:['value'] },
|
||||
'$contains':{ args:['str','pattern']},
|
||||
'$count':{ args:['array'] },
|
||||
'$exists':{ args:['value'] },
|
||||
'$join':{ args:['array','separator'] },
|
||||
@ -117,12 +118,14 @@
|
||||
'$length':{ args:['string'] },
|
||||
'$lookup':{ args:['object','key'] },
|
||||
'$lowercase':{ args:['string'] },
|
||||
'$match':{ args:['str','pattern','limit']},
|
||||
'$map':{ args:[] },
|
||||
'$max':{ args:['array'] },
|
||||
'$min':{ args:['array'] },
|
||||
'$not':{ args:['value'] },
|
||||
'$number':{ args:['value'] },
|
||||
'$reduce':{ args:[] },
|
||||
'$replace':{ args:['str','pattern','replacement','limit']},
|
||||
'$split':{ args:['string','separator','limit'] },
|
||||
'$spread':{ args:['object'] },
|
||||
'$string':{ args:['value'] },
|
||||
@ -130,6 +133,7 @@
|
||||
'$substringAfter':{ args:['string','chars'] },
|
||||
'$substringBefore':{ args:['string','chars'] },
|
||||
'$sum':{ args:['array'] },
|
||||
'$trim': { args:['str'] },
|
||||
'$uppercase':{ args:['string'] }
|
||||
}
|
||||
jsonata.getFunctionSnippet = function(fn) {
|
||||
|
2174
editor/vendor/jsonata/worker-jsonata.js
vendored
2174
editor/vendor/jsonata/worker-jsonata.js
vendored
File diff suppressed because one or more lines are too long
@ -42,7 +42,7 @@
|
||||
"is-utf8":"0.2.1",
|
||||
"js-yaml": "3.7.0",
|
||||
"json-stringify-safe":"5.0.1",
|
||||
"jsonata":"1.0.10",
|
||||
"jsonata":"1.1.1",
|
||||
"media-typer": "0.3.0",
|
||||
"mqtt": "2.2.1",
|
||||
"mustache": "2.3.0",
|
||||
|
@ -27,14 +27,30 @@
|
||||
"args": "str",
|
||||
"desc": "Returns a string with all the characters of `str` converted to lowercase."
|
||||
},
|
||||
"$trim": {
|
||||
"args": "str",
|
||||
"desc": "Normalizes and trims all whitespace characters in str by applying the following steps:\n\n - All tabs, carriage returns, and line feeds are replaced with spaces.\n- Contiguous sequences of spaces are reduced to a single space.\n- Trailing and leading spaces are removed.\n\n If `str` is not specified (i.e. this function is invoked with no arguments), then the context value is used as the value of `str`. An error is thrown if `str` is not a string."
|
||||
},
|
||||
"$contains": {
|
||||
"args": "str, pattern",
|
||||
"desc": "Returns `true` if `str` is matched by `pattern`, otherwise it returns `false`. If `str` is not specified (i.e. this function is invoked with one argument), then the context value is used as the value of `str`. The `pattern` parameter can either be a string or a regular expression."
|
||||
},
|
||||
"$split": {
|
||||
"args": "str[, separator][, limit]",
|
||||
"desc": "Splits the `str` parameter into an array of substrings. It is an error if `str` is not a string. The optional `separator` parameter specifies the characters within the `str` about which it should be split. If `separator` is not specified, then the empty string is assumed, and `str` will be split into an array of single characters. It is an error if `separator` is not a string. The optional `limit` parameter is a number that specifies the maximum number of substrings to include in the resultant array. Any additional substrings are discarded. If `limit` is not specified, then `str` is fully split with no limit to the size of the resultant array. It is an error if `limit` is not a non-negative number."
|
||||
"desc": "Splits the `str` parameter into an array of substrings. It is an error if `str` is not a string. The optional `separator` parameter specifies the characters within the `str` about which it should be split as either a string or regular expression. If `separator` is not specified, then the empty string is assumed, and `str` will be split into an array of single characters. It is an error if `separator` is not a string. The optional `limit` parameter is a number that specifies the maximum number of substrings to include in the resultant array. Any additional substrings are discarded. If `limit` is not specified, then `str` is fully split with no limit to the size of the resultant array. It is an error if `limit` is not a non-negative number."
|
||||
},
|
||||
"$join": {
|
||||
"args": "array[, separator]",
|
||||
"desc": "Joins an array of component strings into a single concatenated string with each component string separated by the optional `separator` parameter. It is an error if the input `array` contains an item which isn't a string. If `separator` is not specified, then it is assumed to be the empty string, i.e. no `separator` between the component strings. It is an error if `separator` is not a string."
|
||||
},
|
||||
"$match": {
|
||||
"args": "str, pattern [, limit]",
|
||||
"desc": "Applies the `str` string to the `pattern` regular expression and returns an array of objects, with each object containing information about each occurrence of a match withing `str`."
|
||||
},
|
||||
"$replace": {
|
||||
"args": "str, pattern, replacement [, limit]",
|
||||
"desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`. "
|
||||
},
|
||||
|
||||
|
||||
"$number": {
|
||||
@ -57,11 +73,11 @@
|
||||
"args": "array",
|
||||
"desc": "Returns the mean value of an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
|
||||
},
|
||||
|
||||
"$boolean": {
|
||||
"args": "arg",
|
||||
"desc": "Casts the argument to a Boolean using the following rules:\n\n - `Boolean` : unchanged\n - `string`: empty : `false`\n - `string`: non-empty : `true`\n - `number`: `0` : `false`\n - `number`: non-zero : `true`\n - `null` : `false`\n - `array`: empty : `false`\n - `array`: contains a member that casts to `true` : `true`\n - `array`: all members cast to `false` : `false`\n - `object`: empty : `false`\n - `object`: non-empty : `true`\n - `function` : `false`"
|
||||
},
|
||||
|
||||
"$not": {
|
||||
"args": "arg",
|
||||
"desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
|
||||
@ -70,6 +86,7 @@
|
||||
"args": "arg",
|
||||
"desc": "Returns Boolean `true` if the `arg` expression evaluates to a value, or `false` if the expression does not match anything (e.g. a path to a non-existent field reference)."
|
||||
},
|
||||
|
||||
"$count": {
|
||||
"args": "array",
|
||||
"desc": "Returns the number of items in the array"
|
||||
|
Loading…
Reference in New Issue
Block a user