UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

16 lines (15 loc) 338 B
export const currencyExtendedFormatter = ( lng: string | undefined, options: any ) => { const formatter = new Intl.NumberFormat(lng, { ...options, style: 'currency', }) return (value: any) => { if (value > 0 && value < 0.01) { return `<${formatter.format(0.01)}` } return formatter.format(value) } }