money-exchange-rate
v1.0.6
Published
货币汇率换算
Downloads
32
Readme
money exchange rate
Currency exchange rate conversion
No dependencies
import { MoneyRatio } from "money-exchange-rate"
import MoneyExchange from "money-exchange-rate"
/**
* fn(
* money: 'string' | 'number',
* params: {
* from: string,
* to: string,
* type?: 'round' | 'floor' | 'ceil' | 'parseInt',
* count?: number,
* }
* )
*/
MoneyExchange(100, { from: 'USD', to: 'CNY' }) // 714
console.log(MoneyRatio)
/**
* AED: 3.67,
* AFN: 88.23,
* ALL: 111.6,
* ANG: 1.7899996,
* AOA: 502,
* ARS: 166.96,
* AUD: 1.49,
* ...
*/