Socket
Socket
Sign inDemoInstall

btrz-mathematics

Package Overview
Dependencies
0
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.4.0

5

lib/mathematics.js
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }

@@ -113,2 +113,5 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

}
if (roundingPolicy === "nocents") {
return wholePlusDigits(whole);
}
if (digits == 0) {

@@ -115,0 +118,0 @@ flip = cents.substr(digits, 1);

2

package.json
{
"name": "btrz-mathematics",
"version": "1.3.0",
"version": "1.4.0",
"description": "Betterez Mathematics",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -96,2 +96,6 @@ "use strict";

if (roundingPolicy === "nocents") {
return wholePlusDigits(whole);
}
if (digits == 0) {

@@ -98,0 +102,0 @@ flip = cents.substr((digits), 1);

@@ -96,2 +96,10 @@ "use strict";

it("should round without decimals and down", function () {
expect(mathematics.roundMoney(1069567, 0, "nocents")).to.be.eql("10.00");
});
it("should round without decimals and down", function () {
expect(mathematics.roundMoney(1019567, 0, "nocents")).to.be.eql("10.00");
});
it("should round with decimals a less than zero non round value", function () {

@@ -98,0 +106,0 @@ expect(mathematics.roundMoney(49567)).to.be.eql("0.50");

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc