
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
currency-converter-lt
Advanced tools
A nodejs currency converter library that doesn't require subscribing to any API calls.
A minimal currency converter library for NodeJS that works out of the box.
This package can be installed using npm
npm install currency-converter-lt
or, yarn
yarn add currency-converter-lt
Import currency-converter-lt
.
const CC = require('currency-converter-lt')
Then instantiate with either the empty constructor
let currencyConverter = new CC()
Or, with a json object
let currencyConverter = new CC({from:"USD", to:"JPY", amount:100})
The convert method will return the conversion based on the last conversion rate and can be used as a promise.
currencyConverter.convert().then((response) => {
console.log(response) //or do something else
})
convert
can also take the amount as a parameter.
currencyConverter.convert(100).then((response) => {
console.log(response) //or do something else
})
To find the rates use the rates
method.
currencyConverter.rates().then((response) => {
console.log(response) //or do something else
})
Chaining is also supported.
currencyConverter.from("USD").to("GBP").amount(125).convert().then((response) => {
console.log(response) //or do something else
})
If any issues are found, they can be reported here.
This project is licensed under the MIT license.
FAQs
A nodejs currency converter library that doesn't require subscribing to any API calls.
The npm package currency-converter-lt receives a total of 4,539 weekly downloads. As such, currency-converter-lt popularity was classified as popular.
We found that currency-converter-lt 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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.