@ceeblue/web-utils
    Preparing search index...

    Function stringify

    • Converts various data types, such as objects, strings, exceptions, errors, or numbers, into a string representation. Since it offers a more comprehensive format, this function is preferred to JSON.stringify().

      Parameters

      • obj: any

        Any objects, strings, exceptions, errors, or number

      • params: { decimal?: number; noBin?: boolean; recursion?: number; space?: string } = {}
        • Optionaldecimal?: number

          2, allows to choose the number of decimal to display in the string representation

        • OptionalnoBin?: boolean

          false, when set skip binary encoding and write inplace a bin-length information

        • Optionalrecursion?: number

          2, recursion depth to stringify recursively every object value until this depth, beware if a value refers to a already parsed value an infinite loop will occur

        • Optionalspace?: string

          '', allows to configure space in the string representation

      Returns string

      the final string representation