@lambdacurry/medusa-payment-braintree
Version:
Braintree plugin for Medusa
10 lines (9 loc) • 427 B
TypeScript
/**
* Formats a number or string to a two-decimal string representation.
* Validates the input is parseable to a number and throws MedusaError on NaN.
*
* @param amount - The amount to format (number or string)
* @returns A string representation with exactly 2 decimal places
* @throws MedusaError if the amount is not a valid number
*/
export declare function formatToTwoDecimalString(amount: number | string): string;