Socket
Socket
Sign inDemoInstall

currency-transformation

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

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
Created
Weekly downloads
 

Readme

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

Last updated on 12 Apr 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc