Changelog
1.0.0-beta.3 (September 20, 2020)
sort()
to be stable for mixed types (#17)ascN
and descN
to define natural sorting functionsascA
and descA
to define sorting functions with reverse order for numbersascAN
and descAN
to define natural sorting functions with reverse order for numbers hProperty
to ObjectEntry
Changelog
1.0.0-beta.2 (May 17, 2020)
Changelog
1.0.0-beta.1 (May 14, 2020)
[...expr]
syntax$$
root reference (arg1
), which refers to second parameter of closest function or undefined
when no suchreduce()
method$method: => 123; $method() or path.$method()
syntax.walk()
API method to traverse AST.123
or .5e-4
{ 1: 'ok', null: 'ok' }
=
and !=
operators to use Object.is()
instead of ===
and !==
operatorsfoo[expr]
) to behave like pick()
methodpick()
method:
$$
)undefined
for object, return first entry value instead of value with key undefined
false
-> 0
and true
-> 1
undefined
group(=>)
will suggest between =>
and )
~=
operator to produce a boolean result onlymapToArray()
method, use entries().({ nameProp: key, ...value })
insteadin
, not in
, has
and has no
which was added (e.g. in query ["a", "b", 1, 2][$ in ["b", 2]]
jora will suggest only "a"
and 1
values in array after in
operator)Changelog
1.0.0-alpha.13 (January 6, 2020)
foo | bar | ...
fromEntries()
method$a;.($a; ...)
doesn't throw with an error nowdebug
option value, i.e. query('...', { debug: (name, value) => /* ... */ })
$
and identifier, previously $foo
can be used as $ foo
, now it throws with a parse errorsrc/parser.js
before publishing, i.e. replace a runtime parser compilation with a pre-compiled versionjison
to dev dependencies, and package has no dependencies anymore (dev only)dist/parser.js
& dist/version.json
from packageChangelog
1.0.0-alpha.12 (December 18, 2019)
dist/parser.js
& dist/version.json
) in packageChangelog
1.0.0-alpha.11 (December 17, 2019)
syntax
interface with 3 methods: syntax.parse(source, tolerantMode)
, syntax.compile(ast, suggestRanges, statMode)
and syntax.stringify(ast)
$str: '<foo>'; str[1:-1]
('foo'
) or $ar:[1,2,3,4,5,6]; $ar[-3::-1]
([6,5,4]
) (#11)slice(from, to)
methodsplit(pattern)
methodjoin(separator)
methodmatch(pattern, matchAll)
method..method()
doesn't raise an error now and works as expected without surrounding parentheses (#10)($a: 1; $a + $a)
=>
, i.e. => body
asc
and desc
keywords, e.g. sort(foo asc)
, $sorting: foo desc; sort($sorting)
or sort(foo desc, bar asc)
sort()
method to use a two argument function as a regular comparator::self
syntax, recursion with a function defined by a variable should be used insteadChangelog
1.0.0-alpha.10 (March 7, 2019)
Changelog
1.0.0-alpha.9 (March 5, 2019)
-
and +
operators to be unaryget
buildin method to map
~=
operator to take any value as tester (not a regexp only); when value is a function it's behaves like filter()
, when null
or undefined
it's always truthy otherwise falsygroup()
method to group by an element when key value is an arrayChangelog
1.0.0-alpha.8 (February 7, 2019)
>
operator when used outside braces, since >
will end a function definition (i.e. <a > 20>
causes to a parse error, but <(a > 20)>
or <foo.[a > 20]>
is not)current
in this case) and definitions are allowed in function's bodyhas
and has no
operators as inverse of in
and not in
and
and or
operators to evaluate left expression only once (good for performance and eliminates duplicates in suggestions)Changelog
1.0.0-alpha.7 (December 25, 2018)
.[
, .(
and ..(
tokens.[]
or filter()
method) behaviour for a non-array value to return a value itself when expression is truthy or undefined
otherwisejora(query, methods?, debug?)
-> jora(query, options?)
where options
is { methods?, debug? }
stat
option, i.e. jora(query, { stat: true })
) to return a query stat interface (an object { stat(), suggestion() }
) instead of resulting datatolerant
option, i.e. jora(query, { tolerant: true })
) to supress parsing errors when possibleversion
to export/
) and regexp