format
Functions
Function
Description
Example
Description
Usage Examples
Currency Formatting
// Basic USD currency (default)
const price = dphelper.format.currency(1234.56);
// Output: "$1,234.56"
// Euro currency with German locale
const euro = dphelper.format.currency(1234.56, 'de-DE', 'EUR');
// Output: "1.234,56 €"
// Japanese Yen
const yen = dphelper.format.currency(5000, 'ja-JPY', 'JPY');
// Output: "¥5,000"
// British Pound
const pound = dphelper.format.currency(99.99, 'en-GB', 'GBP');
// Output: "£99.99"
// Swiss Franc
const franc = dphelper.format.currency(1500, 'de-CH', 'CHF');
// Output: "CHF 1'500.00"Phone Number Formatting
E-commerce Price Display
International Checkout
Details
Last updated