Socket
Socket
Sign inDemoInstall

currency-transformation

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-transformation

Currency transformation util


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Currency transformation util

Installation

yarn add currency-transformation

How to usage

import { CurrencyTransformation, CurrencyList } from 'currency-transformation';

const currencyTransformation = new CurrencyTransformation();

const amount = currencyTransformation.convert({
  amount: 100,
  from: CurrencyList.USD,
  to: CurrencyList.UAH,
  baseCurrency: CurrencyList.UAH, // should be 1 as value in rates list
  moneyFormat: true,
  crossFormat: false,
  rates: {
    EUR: 29.67359,
    GBP: 33.4715,
    RUB: 0.37,
    USD: 27.17391,
    UAH: 1
  }
});

console.log(amount);

FAQs

Package last updated on 12 Apr 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc