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

@coinify/currency

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coinify/currency - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

package.json
{
"name": "@coinify/currency",
"version": "1.0.1",
"version": "1.0.2",
"description": "Helper functions for managing amounts in different currencies",

@@ -32,3 +32,3 @@ "main": "src/index.js",

"devDependencies": {
"@coinify/eslint-config-coinify": "^1.1.5",
"@coinify/eslint-config-coinify": "^1.1.7",
"chai": "^4.1.2",

@@ -35,0 +35,0 @@ "eslint": "^4.11.0",

# node-currency
[![npm version](https://badge.fury.io/js/%40coinify%2Fcurrency.svg)](https://badge.fury.io/js/%40coinify%2Fcurrency)
## Installation

@@ -4,0 +6,0 @@

@@ -9,6 +9,15 @@ const CURRENCIES_NOT_DIVIDED_IN_HUNDREDS = {

TND: 3,
BTC: 8
BTC: 8,
ETH: 12 // We use Mwei as lowest subunit for ether because wei (18 decimals) is too much for integer
};
/**
* Array of supported crypto currencies
*
* @type {array}
*/
const CRYPTO_CURRENCIES = [ 'BTC', 'ETH' ];
/**
* Object of all fiat currencies along with their English name

@@ -183,3 +192,3 @@ *

CURRENCIES_NOT_DIVIDED_IN_HUNDREDS,
FIAT_CURRENCIES
};
FIAT_CURRENCIES, CRYPTO_CURRENCIES
};

@@ -143,3 +143,3 @@ const _ = require('lodash');

function isValidCryptoCurrency(code) {
return code === 'BTC';
return constants.CRYPTO_CURRENCIES.includes(code);
}

@@ -146,0 +146,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