Skip to content

Commit

Permalink
Upgrade JSONata to v1.3.0 (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesstech authored and knolleary committed Sep 7, 2017
1 parent 170d6b2 commit 29cae99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions editor/vendor/jsonata/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
'$map':{ args:[ 'array', 'function' ]},
'$match':{ args:[ 'str', 'pattern', 'limit' ]},
'$max':{ args:[ 'array' ]},
'$merge':{ args:[ 'array' ]},
'$millis':{ args:[ ]},
'$min':{ args:[ 'array' ]},
'$not':{ args:[ 'arg' ]},
'$now':{ args:[ ]},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"is-utf8":"0.2.1",
"js-yaml": "3.8.4",
"json-stringify-safe":"5.0.1",
"jsonata":"1.2.6",
"jsonata":"1.3.0",
"media-typer": "0.3.0",
"mqtt": "2.9.0",
"multer": "1.3.0",
Expand Down
8 changes: 8 additions & 0 deletions red/api/locales/en-US/jsonata.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
"args":"",
"desc":"Returns a pseudo random number greater than or equal to zero and less than one."
},
"$millis": {
"args":"",
"desc":"Returns the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. All invocations of `$millis()` within an evaluation of an expression will all return the same value."
},
"$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."
Expand Down Expand Up @@ -160,6 +164,10 @@
"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."
},
"$merge": {
"args": "array<object>",
"desc": "Merges an array of `objects` into a single `object` containing all the key/value pairs from each of the objects in the input array. If any of the input objects contain the same key, then the returned `object` will contain the value of the last one in the array. It is an error if the input array contains an item that is not an object."
},
"$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]])`"
Expand Down

0 comments on commit 29cae99

Please sign in to comment.