- Support extension functions that mix sync/async behaviours (issue #77)
- Fix S0202 error insert to report token value, not token type (PR #74)
- Remove use of array iterators because they were failing to transpile to ES5 correctly (issue #78)
- Property names containing reserved tokens can now be quoted using backticks (`). The current quoting mechanism using single or double quotes is deprecated and will probably be removed in a future major (e.g. v2.0.0) release.
- The parser can be invoked in a robust mode whereby errors will be indicated by an error token in the parse tree rather than throwing an exception. This is the first step in creating a parser that can recover and report multiple errors. The default mode remains to throw an exception on first syntax error.
- New functions
- $merge - merge an array of objects into a single object
- $millis - current timestamp in milliseconds since the epoch
- fix evaluator when array constructor is the first step in a path expression (issue #63)
- Fix $base64encode and $base64decode functions in the browser
- Fix an issue running in IE11 and phantom.js (#58)
- Fix an issue for a few functions that were not working in ES5 transpiled version (#56)
- Update readme.md with API documentation
- Correctly handle null values when executed with a callback (#53)
- Generate ES5 compatible version of jsonata.js (jsonata-es5.js & jsonata-es5.min.js) using Babel
- use the -es5 version if you need to support older browsers or phantom.js
- New functions $base64encode & base64decode
- Fix formatting of inserts in error messages
- New syntax to specify order of query results
- Support for asynchronous extension functions - callbacks and promises
- New functions
- $floor - numeric rounding down
- $ceil - numeric rounding up
- $round - numeric round half to even
- $abs - numeric absolute value
- $power - numeric power function
- $sqrt - square root
- $random - generate random number
- $now - current timestamp
- $filter - filter array with predicate function
- $sort - sort array with comparator function
- $reverse - reverse contents of array
- $shuffle - shuffle contents of array into random order
- $zip - convolves (zips) multiple arrays into an array of tuples (nested arrays)
- $each - generate array from object by applying function to key/value pairs
- $sift - sift contents of object with predicate function
- The following (previously undocumented) functions have been modified to align them with other functions
- $map - apply a function to all values in an array
- $reduce - apply a function to aggregate (fold) all values in an array
- fix chaining operator for falsy inputs
- fix tokenizer regression for name tokens that start with "in" and "or"
- Make minified version appear in npm
- Enforce eqeqeq rule in JSONata (#41)
- fix regression: some instances of divide token were incorrectly parsed as start of regex
- New syntax to create regular expressions
- Enhanced
$split
function to support regex parameter - New functions
$contains
- tests existence of string/regex in a string$match
- returns an object representing matches against a regex$replace
- replaces occurrences of a substring or regex in a string$trim
- removes excessive whitespace in a string
- Function chaining operator
~>
- allows multiple functions to be applied without excessive nesting
- Context substitutable function parameters
- allows functions to implicitly operate on the context value
- Function signature syntax
- to support runtime validation of function arguments
- Errors now have error codes
- messages maintained in separate catalog