Skip to content

Commit

Permalink
fix: update currency map
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelblijleven authored Jan 6, 2024
1 parent fac857c commit d7eaab0
Showing 1 changed file with 188 additions and 113 deletions.
301 changes: 188 additions & 113 deletions src/lib/currencies.ts
Original file line number Diff line number Diff line change
@@ -1,116 +1,191 @@
export const currencies: Record<string, string> = {
"ALL": "Lek",
"AFN": "؋",
"ARS": "$",
"AWG": "ƒ",
"AUD": "$",
"AZN": "₼",
"BSD": "$",
"BBD": "$",
"BYN": "Br",
"BZD": "BZ$",
"BMD": "$",
"BOB": "$b",
"BAM": "KM",
"BWP": "P",
"BGN": "лв",
"BRL": "R$",
"BND": "$",
"KHR": "៛",
"CAD": "$",
"KYD": "$",
"CLP": "$",
"CNY": "¥",
"COP": "$",
"CRC": "₡",
"HRK": "kn",
"CUP": "₱",
"CZK": "Kč",
"DKK": "kr",
"DOP": "RD$",
"XCD": "$",
"EGP": "£",
"SVC": "$",
"EUR": "€",
"FKP": "£",
"FJD": "$",
"GHS": "¢",
"GIP": "£",
"GTQ": "Q",
"GGP": "£",
"GYD": "$",
"HNL": "L",
"HKD": "$",
"HUF": "Ft",
"ISK": "kr",
"INR": "₹",
"IDR": "Rp",
"IRR": "﷼",
"IMP": "£",
"ILS": "₪",
"JMD": "J$",
"JPY": "¥",
"JEP": "£",
"KZT": "лв",
"KPW": "₩",
"KRW": "₩",
"KGS": "лв",
"LAK": "₭",
"LBP": "£",
"LRD": "$",
"MKD": "ден",
"MYR": "RM",
"MUR": "₨",
"MXN": "$",
"MNT": "₮",
"MNT2": "د.إ",
"MZN": "MT",
"NAD": "$",
"NPR": "₨",
"ANG": "ƒ",
"NZD": "$",
"NIO": "C$",
"NGN": "₦",
"NOK": "kr",
"OMR": "﷼",
"PKR": "₨",
"PAB": "B/.",
"PYG": "Gs",
"PEN": "S/.",
"PHP": "₱",
"PLN": "zł",
"QAR": "﷼",
"RON": "lei",
"RUB": "₽",
"SHP": "£",
"SAR": "﷼",
"RSD": "Дин.",
"SCR": "₨",
"SGD": "$",
"SBD": "$",
"SOS": "S",
"KRW": "₩",
"ZAR": "R",
"LKR": "₨",
"SEK": "kr",
"CHF": "CHF",
"SRD": "$",
"SYP": "£",
"TWD": "NT$",
"THB": "฿",
"TTD": "TT$",
"TRY": "₺",
"TVD": "$",
"UAH": "₴",
"AED": "د.إ",
"GBP": "£",
"USD": "$",
"UYU": "$U",
"UZS": "лв",
"VEF": "Bs",
"VND": "₫",
"YER": "﷼",
"ZWD": "Z$",
export const currencies: Record<string | symbol, string> = {
AED: 'د.إ',
AFN: '؋',
ALL: 'L',
AMD: '֏',
ANG: 'ƒ',
AOA: 'Kz',
ARS: '$',
AUD: '$',
AWG: 'ƒ',
AZN: '₼',
BAM: 'KM',
BBD: '$',
BDT: '৳',
BGN: 'лв',
BHD: '.د.ب',
BIF: 'FBu',
BMD: '$',
BND: '$',
BOB: '$b',
BOV: 'BOV',
BRL: 'R$',
BSD: '$',
BTC: '₿',
BTN: 'Nu.',
BWP: 'P',
BYN: 'Br',
BYR: 'Br',
BZD: 'BZ$',
CAD: '$',
CDF: 'FC',
CHE: 'CHE',
CHF: 'CHF',
CHW: 'CHW',
CLF: 'CLF',
CLP: '$',
CNH: '¥',
CNY: '¥',
COP: '$',
COU: 'COU',
CRC: '₡',
CUC: '$',
CUP: '₱',
CVE: '$',
CZK: 'Kč',
DJF: 'Fdj',
DKK: 'kr',
DOP: 'RD$',
DZD: 'دج',
EEK: 'kr',
EGP: '£',
ERN: 'Nfk',
ETB: 'Br',
ETH: 'Ξ',
EUR: '€',
FJD: '$',
FKP: '£',
GBP: '£',
GEL: '₾',
GGP: '£',
GHC: '₵',
GHS: 'GH₵',
GIP: '£',
GMD: 'D',
GNF: 'FG',
GTQ: 'Q',
GYD: '$',
HKD: '$',
HNL: 'L',
HRK: 'kn',
HTG: 'G',
HUF: 'Ft',
IDR: 'Rp',
ILS: '₪',
IMP: '£',
INR: '₹',
IQD: 'ع.د',
IRR: '﷼',
ISK: 'kr',
JEP: '£',
JMD: 'J$',
JOD: 'JD',
JPY: '¥',
KES: 'KSh',
KGS: 'лв',
KHR: '៛',
KMF: 'CF',
KPW: '₩',
KRW: '₩',
KWD: 'KD',
KYD: '$',
KZT: '₸',
LAK: '₭',
LBP: '£',
LKR: '₨',
LRD: '$',
LSL: 'M',
LTC: 'Ł',
LTL: 'Lt',
LVL: 'Ls',
LYD: 'LD',
MAD: 'MAD',
MDL: 'lei',
MGA: 'Ar',
MKD: 'ден',
MMK: 'K',
MNT: '₮',
MOP: 'MOP$',
MRO: 'UM',
MRU: 'UM',
MUR: '₨',
MVR: 'Rf',
MWK: 'MK',
MXN: '$',
MXV: 'MXV',
MYR: 'RM',
MZN: 'MT',
NAD: '$',
NGN: '₦',
NIO: 'C$',
NOK: 'kr',
NPR: '₨',
NZD: '$',
OMR: '﷼',
PAB: 'B/.',
PEN: 'S/.',
PGK: 'K',
PHP: '₱',
PKR: '₨',
PLN: 'zł',
PYG: 'Gs',
QAR: '﷼',
RMB: '¥',
RON: 'lei',
RSD: 'Дин.',
RUB: '₽',
RWF: 'R₣',
SAR: '﷼',
SBD: '$',
SCR: '₨',
SDG: 'ج.س.',
SEK: 'kr',
SGD: 'S$',
SHP: '£',
SLL: 'Le',
SOS: 'S',
SRD: '$',
SSP: '£',
STD: 'Db',
STN: 'Db',
SVC: '$',
SYP: '£',
SZL: 'E',
THB: '฿',
TJS: 'SM',
TMT: 'T',
TND: 'د.ت',
TOP: 'T$',
TRL: '₤',
TRY: '₺',
TTD: 'TT$',
TVD: '$',
TWD: 'NT$',
TZS: 'TSh',
UAH: '₴',
UGX: 'USh',
USD: '$',
UYI: 'UYI',
UYU: '$U',
UYW: 'UYW',
UZS: 'лв',
VEF: 'Bs',
VES: 'Bs.S',
VND: '₫',
VUV: 'VT',
WST: 'WS$',
XAF: 'FCFA',
XBT: 'Ƀ',
XCD: '$',
XOF: 'CFA',
XPF: '₣',
XSU: 'Sucre',
XUA: 'XUA',
YER: '﷼',
ZAR: 'R',
ZMW: 'ZK',
ZWD: 'Z$',
ZWL: '$'
};

export function toCurrency(value: number, currencySymbol: string): string {
Expand Down

0 comments on commit d7eaab0

Please sign in to comment.