Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
currency-transform
Advanced tools
Readme
汇率转换,内部使用百度汇率转换 api
Node.js 4 or higher
$ npm install currency-transform --save
var transform = require('currency-transform')
transform({
apiKey: '', // add your baidu developer apiKey
from: 'JPY',
amount: 100
}).then(function(data) {
console.log(data)
})
transform(options)
options
参数定义
options.apiKey
API密钥options.from
待转化的币种,默认 USD
options.to
转化后的币种,默认 CNY
options.amount
转化金额,默认 1
返回内容 data
{
fromCurrency: 'USD', //待转化币种的简称,这里为美元
toCurrency: 'CNY', //转化后的币种的简称,这里为人民币
date: '2016-06-23', //日期
time: '14:37:44', //时间
currency: '6.576500', //当前汇率
amount: 1, //转化的金额
convertedamount: 6.5765 //转化后的金额
}
FAQs
汇率转换,内部使用百度汇率转换 `api`
The npm package currency-transform receives a total of 0 weekly downloads. As such, currency-transform popularity was classified as not popular.
We found that currency-transform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.