You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parse() now returns an expression that expects the scope to be passed as an argument. This allows reusing the same expression in different contexts without having to parse the expression or rules again. For example:
constexpression=jshiki.parse('`Hello ${name}!`')constresult=expression({name: 'Azumi'})// result => 'Hello Azumi!'
ES2020 syntax is now supported, and support for Node 12.x has been dropped.
NaN and Infinity identifiers are now supported.
Unicode escape sequences \x and \u are now supported.
The bundled, custom version of esprima has been entirely removed and replaced with an external dependency on acorn, a fast, lightweight Javascript parser. The corresponding licences for Polymer Expressions and esprima have been removed from the project as the code to which they pertain is no longer part of the project.
Fixes
Fixed a bug where holes in sparse arrays were being evaluated as null.
Fixed a bug where undefined could evaluate to a value other than undefined if a property named undefined was defined on the scope object.
Fixed a bug where calling a function returned by a function would not evaluate and instead return the function.
Fixed a bug where computed property accessors were not being evaluated (obj[prop] was being evaluated as obj['prop'] instead of obj[prop]).
Fixed a bug where a function member of a scope object that returned this would result in a TypeError being thrown.
Fixed a bug where a function member of a scope object could not access properties on this.
Fixed a bug where logical operators (&&, ||) would evaluate both operands before evaluating the result.