Blockbench Reference Docs
    Preparing search index...

    Function Condition

    • Tests if a condition is truthy or falsy. Returns true if the condition is unspecified

      Type Parameters

      • Context extends unknown = any

      Parameters

      Returns boolean

    • Parameters

      • condition: boolean | (() => boolean)

        Input condition. Can be undefined, a boolean, a function or a condition any

      • context: any

        Reusable data types that can be used by anything, but should not be used to store data between function calls. Can be used to save memory on frequent function calls.

      Returns boolean