The path to the property to which access should be allowed.
Defines which binary operators are allowed. Must provide an allow list or a
block list, but not both. Valid options are +
, -
, *
, **
, /
, %
,
<
, >
, <=
, >=
, ==
, !=
, ===
, !==
, |
, &
, <<
, >>
, >>>
,
in
, instanceof
.
The path to the property to which access should be blocked.
A compiled, executable async expression.
const expression = jshiki.parseAsync('await foo.bar()')
await expression({
foo: { bar: async () => 'baz' },
}) // => 'baz'
The scope to use when evaluating the expression. The expression will be limited to accessing the properties of the scope.
A compiled, executable expression.
const expression = jshiki.parse('foo.bar')
expression({
foo: { bar: 'baz' },
}) // => 'baz'
The scope to use when evaluating the expression. The expression will be limited to accessing the properties of the scope.
Defines which logical operators are allowed. Must provide either an allow
list or a block list, but not both. Valid options are ||
, &&
, ??
.
Defines which unary operators are allowed. Must provide an allow list or a
block list, but not both. Valid options are -
, +
, !
, ~
, typeof
.
Evaluates an expression.
The expression to evaluate.
The options to use.
The result of the expression.
Parses an expression into an executable function.
The expression to parse.
The parsed expression.
Evaluates an expression.
The expression to evaluate.
The options to use.
The result of the expression.
Evaluates an expression asynchronously.
The expression to evaluate.
The options to use.
The result of the expression.
Parses an expression into an executable function.
The expression to parse.
The parsed expression.
Parses an expression into an executable async function.
The expression to parse.
The parsed expression.
Generated using TypeDoc
A path to a property. Can be a string of format
foo.bar.baz
or an array of format['foo', 'bar', Symbol('baz')]
. '*' can be used as a wildcard. '**' can be used as a wildcard for properties at any depth.