@xo-cash/utils
    Preparing search index...

    Function parseTemplate

    • Accepts a template value and returns a validated XOTemplate object. The input may be either an Extended JSON string or a pre-parsed object. Both are validated against the XOTemplate schema.

      Parameters

      • inputTemplate: string | XOTemplate

        The value to validate. May be an Extended JSON string or a pre-parsed object.

      Returns XOTemplate

      The validated template object

      If a pre-parsed object input cannot be serialized to JSON for normalization.

      If the string input is not valid JSON.

      If the value does not conform to the XOTemplate schema.