mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
192 lines
12 KiB
JSON
192 lines
12 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."
|
|
},
|
|
"$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 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 within `str`."
|
|
},
|
|
"$replace": {
|
|
"args": "str, pattern, replacement [, limit]",
|
|
"desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`. "
|
|
},
|
|
"$now": {
|
|
"args":"",
|
|
"desc":"Generates a timestamp in ISO 8601 compatible format and returns it as a string."
|
|
},
|
|
"$base64encode": {
|
|
"args":"string",
|
|
"desc":"Converts an ASCII string to a base 64 representation. Each each character in the string is treated as a byte of binary data. This requires that all characters in the string are in the 0x00 to 0xFF range, which includes all characters in URI encoded strings. Unicode characters outside of that range are not supported."
|
|
},
|
|
"$base64decode": {
|
|
"args":"string",
|
|
"desc":"Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
|
|
},
|
|
"$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."
|
|
},
|
|
"$abs": {
|
|
"args":"number",
|
|
"desc":"Returns the absolute value of the `number` parameter."
|
|
},
|
|
"$floor": {
|
|
"args":"number",
|
|
"desc":"Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
|
|
},
|
|
"$ceil": {
|
|
"args":"number",
|
|
"desc":"Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
|
|
},
|
|
"$round": {
|
|
"args":"number [, precision]",
|
|
"desc":"Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
|
|
},
|
|
"$power": {
|
|
"args":"base, exponent",
|
|
"desc":"Returns the value of `base` raised to the power of `exponent`."
|
|
},
|
|
"$sqrt": {
|
|
"args":"number",
|
|
"desc":"Returns the square root of the value of the `number` parameter."
|
|
},
|
|
"$random": {
|
|
"args":"",
|
|
"desc":"Returns a pseudo random number greater than or equal to zero and less than one."
|
|
},
|
|
"$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"
|
|
},
|
|
"$sort": {
|
|
"args":"array [, function]",
|
|
"desc":"Returns an array containing all the values in the `array` parameter, but sorted into order.\n\nIf a comparator `function` is supplied, then it must be a function that takes two parameters:\n\n`function(left, right)`\n\nThis function gets invoked by the sorting algorithm to compare two values left and right. If the value of left should be placed after the value of right in the desired sort order, then the function must return Boolean `true` to indicate a swap. Otherwise it must return `false`."
|
|
},
|
|
"$reverse": {
|
|
"args":"array",
|
|
"desc":"Returns an array containing all the values from the `array` parameter, but in reverse order."
|
|
},
|
|
"$shuffle": {
|
|
"args":"array",
|
|
"desc":"Returns an array containing all the values from the `array` parameter, but shuffled into random order."
|
|
},
|
|
"$zip": {
|
|
"args":"array, ...",
|
|
"desc":"Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
|
|
},
|
|
"$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."
|
|
},
|
|
"$sift": {
|
|
"args":"object, function",
|
|
"desc":"Returns an object that contains only the key/value pairs from the `object` parameter that satisfy the predicate `function` passed in as the second parameter.\n\nThe function that is supplied as the second parameter must have the following signature:\n\n`function(value [, key [, object]])`"
|
|
},
|
|
"$each": {
|
|
"args":"object, function",
|
|
"desc":"Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
|
|
},
|
|
"$map": {
|
|
"args":"array, function",
|
|
"desc":"Returns an array containing the results of applying the `function` parameter to each value in the `array` parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
|
|
},
|
|
"$filter": {
|
|
"args":"array, function",
|
|
"desc":"Returns an array containing only the values in the array parameter that satisfy the `function` predicate.\n\nThe function that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
|
|
},
|
|
"$reduce": {
|
|
"args":"array, function [, init]",
|
|
"desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`."
|
|
},
|
|
"$flowContext": {
|
|
"args": "string",
|
|
"desc": "Retrieves a flow context property."
|
|
},
|
|
"$globalContext": {
|
|
"args": "string",
|
|
"desc": "Retrieves a global context property."
|
|
}
|
|
}
|