Skip to content

__evaluate_entry and __evaluate_exit can be overridden inside expression #695

@adamscybot

Description

@adamscybot

These "secret" environment callbacks are regularly used to timebox expressions or detect loops. You can disable such protections by assigning them to a falsey value inside the expression itself.

These bindings should probably be non-writeable (possibly non-readable also?) from inside the expression:

const expression = jsonata(`
 (
    $__evaluate_entry := false;
    $__evaluate_exit := false;
    /* Anything here, like a loop, will not be captured by the entry and exit callbacks */
  )
`)

await expression.evaluate()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions