mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
99 lines
5.9 KiB
JSON
99 lines
5.9 KiB
JSON
{
|
|
"$string": {
|
|
"args": "arg",
|
|
"desc": "Casts the *arg* parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function"
|
|
},
|
|
"$length": {
|
|
"args": "str",
|
|
"desc": "Returns the number of characters in the string `str`. An error is thrown if `str` is not a string."
|
|
},
|
|
"$substring": {
|
|
"args": "str, start[, length]",
|
|
"desc": "Returns a string containing the characters in the first parameter `str` starting at position `start` (zero-offset). If `length` is specified, then the substring will contain maximum `length` characters. If `start` is negative then it indicates the number of characters from the end of `str`."
|
|
},
|
|
"$substringBefore": {
|
|
"args": "str, chars",
|
|
"desc": "Returns the substring before the first occurrence of the character sequence chars in `str`. If `str` does not contain `chars`, then it returns `str`."
|
|
},
|
|
"$substringAfter": {
|
|
"args": "str, chars",
|
|
"desc": "Returns the substring after the first occurrence of the character sequence `chars` in `str`. If `str` does not contain `chars`, then it returns `str`."
|
|
},
|
|
"$uppercase": {
|
|
"args": "str",
|
|
"desc": "Returns a string with all the characters of `str` converted to uppercase."
|
|
},
|
|
"$lowercase": {
|
|
"args": "str",
|
|
"desc": "Returns a string with all the characters of `str` converted to lowercase."
|
|
},
|
|
"$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."
|
|
},
|
|
"$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."
|
|
},
|
|
|
|
|
|
"$number": {
|
|
"args": "arg",
|
|
"desc": "Casts the `arg` parameter to a number using the following casting rules:\n\n - Numbers are unchanged\n - Strings that contain a sequence of characters that represent a legal JSON number are converted to that number\n - All other values cause an error to be thrown."
|
|
},
|
|
"$sum": {
|
|
"args": "array",
|
|
"desc": "Returns the arithmetic sum of an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
|
|
},
|
|
"$max": {
|
|
"args": "array",
|
|
"desc": "Returns the maximum number in an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
|
|
},
|
|
"$min": {
|
|
"args": "array",
|
|
"desc": "Returns the minimum number in an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
|
|
},
|
|
"$average": {
|
|
"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"
|
|
},
|
|
"$exists": {
|
|
"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"
|
|
},
|
|
"$append": {
|
|
"args": "array, array",
|
|
"desc": "Appends two arrays"
|
|
},
|
|
|
|
"$keys": {
|
|
"args": "object",
|
|
"desc": "Returns an array containing the keys in the object. If the argument is an array of objects, then the array returned contains a de-duplicated list of all the keys in all of the objects."
|
|
},
|
|
|
|
"$lookup": {
|
|
"args": "object, key",
|
|
"desc": "Returns the value associated with key in object. If the first argument is an array of objects, then all of the objects in the array are searched, and the values associated with all occurrences of key are returned."
|
|
},
|
|
|
|
"$spread": {
|
|
"args": "object",
|
|
"desc": "Splits an object containing key/value pairs into an array of objects, each of which has a single key/value pair from the input object. If the parameter is an array of objects, then the resultant array contains an object for every key/value pair in every object in the supplied array."
|
|
}
|
|
|
|
|
|
}
|