Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netzo/auth/utils/display.ts>formatCurrency

Deno-powered framework for building business web apps
Go to Latest
function formatCurrency
import { formatCurrency } from "https://deno.land/x/netzo@0.4.10/auth/utils/display.ts";

Returns a formatted string based on the given amount of currency and the en-US locale. Change the locale for your use case as required.

Examples

Example 1

import { formatCurrency } from "../../../../auth/utils/display.ts";

formatCurrency(5, "USD"); // Returns "$5"

Parameters

amount: number
currency: string

Returns

string