1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #2340 from pdong/chore/update-to-jsonata-1.7

Update JSONata to 1.7.0
This commit is contained in:
Nick O'Leary 2019-10-25 10:25:22 +01:00 committed by GitHub
commit 4d58902ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 8 deletions

View File

@ -47,7 +47,7 @@
"is-utf8": "0.2.1", "is-utf8": "0.2.1",
"js-yaml": "3.13.1", "js-yaml": "3.13.1",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"jsonata": "1.6.5", "jsonata": "1.7.0",
"media-typer": "1.1.0", "media-typer": "1.1.0",
"memorystore": "1.6.1", "memorystore": "1.6.1",
"mime": "2.4.4", "mime": "2.4.4",

View File

@ -1,7 +1,7 @@
{ {
"$string": { "$string": {
"args": "arg", "args": "arg[, prettify]",
"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" "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. If `prettify` is true, then \"prettified\" JSON is produced. i.e One line per field and lines will be indented based on the field depth."
}, },
"$length": { "$length": {
"args": "str", "args": "str",
@ -185,7 +185,7 @@
}, },
"$reduce": { "$reduce": {
"args":"array, function [, init]", "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`.\n\nThe optional `init` parameter is used as the initial value in the aggregation." "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`. The signature of `function` must be of the form: `myfunc($accumulator, $value[, $index[, $array]])`\n\nThe optional `init` parameter is used as the initial value in the aggregation."
}, },
"$flowContext": { "$flowContext": {
"args": "string[, string]", "args": "string[, string]",
@ -230,6 +230,37 @@
"$parseInteger": { "$parseInteger": {
"args": "string, picture", "args": "string, picture",
"desc": "Parses the contents of the `string` parameter to an integer (as a JSON number) using the format specified by the `picture` string. The `picture` string parameter has the same format as `$formatInteger`." "desc": "Parses the contents of the `string` parameter to an integer (as a JSON number) using the format specified by the `picture` string. The `picture` string parameter has the same format as `$formatInteger`."
},
"$error": {
"args": "[str]",
"desc": "Throws an error with a message. The optional `str` will replace the default message of `$error() function evaluated`"
},
"$assert": {
"args": "arg, str",
"desc": "If `arg` is true the function returns undefined. If `arg` is false an exception is thrown with `str` as the message of the exception."
},
"$single": {
"args": "array, function",
"desc": "Returns the one and only value in the `array` parameter that satisfies the `function` predicate (i.e. the `function` returns Boolean `true` when passed the value). Throws an exception if the number of matching values is not exactly one.\n\nThe function should be supplied in the following signature: `function(value [, index [, array]])` where value is each input of the array, index is the position of that value and the whole array is passed as the third argument"
},
"$encodeUrl": {
"args": "str",
"desc": "Encodes a Uniform Resource Locator (URL) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.\n\nExample: `$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`"
},
"$encodeUrlComponent": {
"args": "str",
"desc": "Encodes a Uniform Resource Locator (URL) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. \n\nExample: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`"
},
"$decodeUrl": {
"args": "str",
"desc": "Decodes a Uniform Resource Locator (URL) component previously created by encodeUrlComponent. \n\nExample: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
},
"$decodeUrlComponent": {
"args": "str",
"desc": "Decodes a Uniform Resource Locator (URL) previously created by encodeUrl. \n\nExample: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
},
"$distinct": {
"args": "array",
"desc": "Returns an array with duplicate values removed from `array`"
} }
} }

View File

@ -109,6 +109,7 @@
{ {
'$abs':{ args:[ 'number' ]}, '$abs':{ args:[ 'number' ]},
'$append':{ args:[ 'array1', 'array2' ]}, '$append':{ args:[ 'array1', 'array2' ]},
'$assert':{ args: [ 'arg', 'str' ]},
'$average':{ args:[ 'array' ]}, '$average':{ args:[ 'array' ]},
'$base64decode':{ args:[ ]}, '$base64decode':{ args:[ ]},
'$base64encode':{ args:[ ]}, '$base64encode':{ args:[ ]},
@ -116,8 +117,14 @@
'$ceil':{ args:[ 'number' ]}, '$ceil':{ args:[ 'number' ]},
'$contains':{ args:[ 'str', 'pattern' ]}, '$contains':{ args:[ 'str', 'pattern' ]},
'$count':{ args:[ 'array' ]}, '$count':{ args:[ 'array' ]},
'$decodeUrl':{ args:[ 'str' ]},
'$decodeUrlComponent':{ args:[ 'str' ]},
'$distinct':{ args:[ 'array' ]},
'$each':{ args:[ 'object', 'function' ]}, '$each':{ args:[ 'object', 'function' ]},
'$encodeUrl':{ args: ['str'] },
'$encodeUrlComponent':{ args:[ 'str' ]},
'$env': { args:[ 'arg' ]}, '$env': { args:[ 'arg' ]},
'$error':{ args:[ 'str' ]},
'$eval': { args: ['expr', 'context']}, '$eval': { args: ['expr', 'context']},
'$exists':{ args:[ 'arg' ]}, '$exists':{ args:[ 'arg' ]},
'$filter':{ args:[ 'array', 'function' ]}, '$filter':{ args:[ 'array', 'function' ]},
@ -151,12 +158,13 @@
'$reverse':{ args:[ 'array' ]}, '$reverse':{ args:[ 'array' ]},
'$round':{ args:[ 'number', 'precision' ]}, '$round':{ args:[ 'number', 'precision' ]},
'$shuffle':{ args:[ 'array' ]}, '$shuffle':{ args:[ 'array' ]},
'$sift':{ args:[ 'object', 'function' ]}, '$sift':{ args: ['object', 'function'] },
'$single':{ args: ['array', 'function'] },
'$sort':{ args:[ 'array', 'function' ]}, '$sort':{ args:[ 'array', 'function' ]},
'$split':{ args:[ 'str', 'separator', 'limit' ]}, '$split':{ args:[ 'str', 'separator', 'limit' ]},
'$spread':{ args:[ 'object' ]}, '$spread':{ args:[ 'object' ]},
'$sqrt':{ args:[ 'number' ]}, '$sqrt':{ args:[ 'number' ]},
'$string':{ args:[ 'arg' ]}, '$string':{ args:[ 'arg', 'prettify' ]},
'$substring':{ args:[ 'str', 'start', 'length' ]}, '$substring':{ args:[ 'str', 'start', 'length' ]},
'$substringAfter':{ args:[ 'str', 'chars' ]}, '$substringAfter':{ args:[ 'str', 'chars' ]},
'$substringBefore':{ args:[ 'str', 'chars' ]}, '$substringBefore':{ args:[ 'str', 'chars' ]},

View File

@ -18,7 +18,7 @@
"clone": "2.1.2", "clone": "2.1.2",
"i18next": "15.1.2", "i18next": "15.1.2",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"jsonata": "1.6.5", "jsonata": "1.7.0",
"when": "3.7.8" "when": "3.7.8"
} }
} }