Skip to content

Proposal: Add $assert() function #369

@jhorbulyk

Description

@jhorbulyk

Originally proposed in #167

Once JSONata has an $error() function, the most common use case becomes building assert statements.

Syntax:
$assert(condition, message)
If condition is true, the function returns undefined. If the condition is false, an exception is thrown with the message as the message of the exception.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions