Documentation
    Preparing search index...
    • Formats a given price to a specified number of decimal places.

      Parameters

      • price: string | number

        The price to format. Can be a number, string, null, or undefined.

      • Optionaldecimals: number = 2

        The number of decimal places to format the price to. Defaults to 2.

      Returns string

      The formatted price as a string, or null if the input is invalid.