Novastera:货币信息
一个全面的货币数据库,为全球商业应用程序提供准确的货币信息。包括最新的货币代码,符号,小数位数和国家协会。
功能
-
完整的货币覆盖
- 所有ISO 4217货币代码
- 加密货币支持(BTC, ETH等)
- 每种货币的精确小数点
- 官方货币符号
- Country-to-currency映射
-
业务准备
- 完美的发票系统
- 理想的ERP和CRM实施
- 金融应用程序的多币种支持
- 精确的十进制处理计算
安装
npm install @novastera-oss/currencies-info
# or
yarn add @novastera-oss/currencies-info
使用
import { CURRENCIES } from '@novastera-oss/currencies-info';
// Get all currencies
console.log(CURRENCIES.list);
// ["USD", "EUR", "GBP", ...]
// Get currency details
console.log(CURRENCIES.currency["USD"]);
// { s: "$", d: 2 } // s: symbol, d: decimal places
// Get currency options (useful for dropdowns)
console.log(CURRENCIES.options);
// [{ id: "USD", l: "United States Dollar (USD)" }, ...]
// Get currencies used in a country
console.log(CURRENCIES.country["FR"]);
// ["EUR"]
类型
interface CurrencyInfo {
s: string; // Currency symbol
d: number; // Number of decimal places
}
interface OptionType {
id: string; // Currency code
l: string; // Display label
}
interface Currencies {
list: string[]; // All available currency codes
options: OptionType[]; // Formatted options for dropdowns
currency: Record<string, CurrencyInfo>;// Currency details by code
country: Record<string, string[]>; // Country to currency mappings
}
用例
- 需要精确货币格式的金融软件
- 国际电子商务平台
- 支持多币种的ERP系统
- 客户关系管理系统处理国际客户
- 要求货币精度的发票系统
- 金融计算器和转换器
关于
的一部分 Novastera的业务管理解决方案套件,这个包确保准确的货币处理跨您所有的业务应用程序。访问我们的 网站 了解更多关于我们的综合解决方案。
许可证
麻省理工学院© Novastera