Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@depay/local-currency

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@depay/local-currency - npm Package Compare versions

Comparing version 3.1.0 to 3.2.1

6

dist/esm/index.js

@@ -439,7 +439,5 @@ var timezoneToCurrency = {

static async fromUSD({ amount, code, timeZone, apiKey }) {
static async fromUSD({ amount, code, timeZone }) {
let currency = new Currency({ amount, code, timeZone });
let rate = await fetch('https://api.depay.fi/v2/currencies/' + currency.code, {
headers: { 'X-Api-Key': apiKey },
})
let rate = await fetch('https://public.depay.fi/currencies/' + currency.code)
.then((response) => response.json())

@@ -446,0 +444,0 @@ .then((data) => parseFloat(data));

@@ -445,7 +445,5 @@ (function (global, factory) {

static async fromUSD({ amount, code, timeZone, apiKey }) {
static async fromUSD({ amount, code, timeZone }) {
let currency = new Currency({ amount, code, timeZone });
let rate = await fetch('https://api.depay.fi/v2/currencies/' + currency.code, {
headers: { 'X-Api-Key': apiKey },
})
let rate = await fetch('https://public.depay.fi/currencies/' + currency.code)
.then((response) => response.json())

@@ -452,0 +450,0 @@ .then((data) => parseFloat(data));

{
"name": "@depay/local-currency",
"moduleName": "LocalCurrency",
"version": "3.1.0",
"version": "3.2.1",
"description": "JavaScript library that detects user's local currency and provides functionalities to convert between multiple currencies.",

@@ -6,0 +6,0 @@ "main": "dist/umd/index.js",

@@ -54,3 +54,3 @@ ## Quickstart

```javascript
let currency = await Currency.fromUSD({ amount: 20, apiKey: 'MY-API-KEY' })
let currency = await Currency.fromUSD({ amount: 20 })
currency.toString()

@@ -60,6 +60,2 @@ // €16.88

Requires you to pass an `apiKey` in order to convert currencies!
See: https://depay.fi/documentation/api#fiat
### getCode

@@ -66,0 +62,0 @@

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