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

@bitzlato/money-js

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitzlato/money-js - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

8

dist/index.cjs.js

@@ -62,13 +62,13 @@ 'use strict';

assertSameCurrency(this, money);
return new Money(this.amount.plus(money.amount), this.currency);
return new Money(this.amount.plus(money.amount), this.currency, this.roundingMode);
}
subtract(money) {
assertSameCurrency(this, money);
return new Money(this.amount.minus(money.amount), this.currency);
return new Money(this.amount.minus(money.amount), this.currency, this.roundingMode);
}
multiply(multiplier) {
return new Money(this.amount.times(multiplier), this.currency);
return new Money(this.amount.times(multiplier), this.currency, this.roundingMode);
}
divide(divisor) {
return new Money(this.amount.div(divisor), this.currency);
return new Money(this.amount.div(divisor), this.currency, this.roundingMode);
}

@@ -75,0 +75,0 @@ compare(money) {

@@ -56,13 +56,13 @@ import Big from 'big.js';

assertSameCurrency(this, money);
return new Money(this.amount.plus(money.amount), this.currency);
return new Money(this.amount.plus(money.amount), this.currency, this.roundingMode);
}
subtract(money) {
assertSameCurrency(this, money);
return new Money(this.amount.minus(money.amount), this.currency);
return new Money(this.amount.minus(money.amount), this.currency, this.roundingMode);
}
multiply(multiplier) {
return new Money(this.amount.times(multiplier), this.currency);
return new Money(this.amount.times(multiplier), this.currency, this.roundingMode);
}
divide(divisor) {
return new Money(this.amount.div(divisor), this.currency);
return new Money(this.amount.div(divisor), this.currency, this.roundingMode);
}

@@ -69,0 +69,0 @@ compare(money) {

{
"name": "@bitzlato/money-js",
"version": "0.0.3",
"version": "0.0.4",
"description": "A small library for working with monetary values",

@@ -31,10 +31,10 @@ "author": "Maksim Gerasimov <treizeger@gmail.com> (http://github.com/trzmaxim)",

"devDependencies": {
"@swc/core": "^1.2.102",
"@swc/jest": "^0.2.5",
"@types/jest": "^27.0.2",
"jest": "^27.3.1",
"@swc/core": "^1.2.121",
"@swc/jest": "^0.2.15",
"@types/jest": "^27.0.3",
"jest": "^27.4.5",
"rollup": "^1.29.0",
"rollup-plugin-typescript2": "^0.30.0",
"typescript": "^4.4.4"
"rollup-plugin-typescript2": "^0.31.1",
"typescript": "^4.5.4"
}
}
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