• Format clarity values in clarity style strings with the ability to prettify the result with line break end space indentation.

    Parameters

    • cv: ClarityValue

      The Clarity Value to format

    • space: number = 0

      The indentation size of the output string. There's no indentation and no line breaks if space = 0

    Returns string

    Example

    prettyPrint(Cl.tuple({ id: Cl.uint(1), age: Cl.some(Cl.uint(42)) }))
    // { age: (some u42), id: u1 }

    prettyPrint(Cl.tuple({ id: Cl.uint(1), age: Cl.some(Cl.uint(42)) }, 2))
    // {
    // age: (some u42),
    // id: u1
    // }

Generated using TypeDoc