mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
8 lines
267 B
TypeScript
8 lines
267 B
TypeScript
const formatter = new Intl.NumberFormat("en-US", {
|
|
style: "currency",
|
|
currency: "USD",
|
|
})
|
|
|
|
export const formatCurrency = (amount: number) => formatter.format(amount)
|
|
|
|
export const parsePrice = (price?: string) => (price ? parseFloat(price) * 1_000_000 : undefined)
|