Saxonberg Server API
    Preparing search index...

    Operations over a ScriptValue. A static-only value-object — the model's one concept, the home that keeps the truthiness rule (and later the value→arg render + narrowing helpers) out of a free function.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Truthiness for control flow. The rules:

      • undefined (void) → false.
      • boolean → itself.
      • number → false for 0 / NaN, else true.
      • string → non-empty.
      • StuffListnon-empty (the MQL-emptiness-is-falsiness rule).
      • Block → true (a block is a value).
      • any other object → a single Stuff, which is always truthy.

      Order matters: arrays and Block are tested before the catch-all Stuff branch so an object isn't misclassified.

      Parameters

      Returns boolean