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

@makerdao/currency

Package Overview
Dependencies
Maintainers
18
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@makerdao/currency - npm Package Compare versions

Comparing version 0.9.5 to 0.9.6

6

dist/Currency.js

@@ -139,3 +139,5 @@ 'use strict';

function assertValidOperation(method, left, right) {
var message = 'Invalid operation: ' + left.symbol + ' ' + method + ' ' + right.symbol;
if (!right && right !== 0) {
throw new Error('Invalid operation: ' + left.symbol + ' ' + method + ' with no right operand');
}

@@ -163,3 +165,3 @@ if (!(right instanceof Currency) || left.isSameType(right)) return;

throw new Error(message);
throw new Error('Invalid operation: ' + left.symbol + ' ' + method + ' ' + right.symbol);
}

@@ -166,0 +168,0 @@

{
"name": "@makerdao/currency",
"description": "Utilities for working with currency amounts",
"version": "0.9.5",
"version": "0.9.6",
"license": "MIT",

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

@@ -87,3 +87,7 @@ import BigNumber from 'bignumber.js';

function assertValidOperation(method, left, right) {
const message = `Invalid operation: ${left.symbol} ${method} ${right.symbol}`;
if (!right && right !== 0) {
throw new Error(
`Invalid operation: ${left.symbol} ${method} with no right operand`
);
}

@@ -111,3 +115,5 @@ if (!(right instanceof Currency) || left.isSameType(right)) return;

throw new Error(message);
throw new Error(
`Invalid operation: ${left.symbol} ${method} ${right.symbol}`
);
}

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