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

js-big-decimal

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-big-decimal - npm Package Compare versions

Comparing version 1.3.14 to 1.3.15

2

package.json
{
"name": "js-big-decimal",
"version": "1.3.14",
"version": "1.3.15",
"description": "Work with large numbers on the client side. Round them off to any required precission.",

@@ -5,0 +5,0 @@ "main": "dist/node/js-big-decimal",

@@ -24,2 +24,3 @@ # JS Big Decimal

- [Contributors Welcome!](#contributors-welcome)
- [Installation](#installation)

@@ -32,2 +33,3 @@ - [Usage](#usage)

- [round(number, precision, roundingMode)](#roundnumber-precision-roundingmode)
- [abs(number)](#absnumber)
- [floor(number)](#floornumber)

@@ -148,2 +150,14 @@ - [ceil(number)](#ceilnumber)

### abs(number)
Returns the absolute value of a number.
```javascript
var n1 = bigDecimal.abs(12.8) // "12.8"
var n2 = bigDecimal.abs(-12.3) // "12.3"
```
The instance returns the result as new `bigDecimal`
```javascript
var n1 = new bigDecimal(12.8).abs() // bigDecimal(12.8)
var n2 = new bigDecimal(-12.3).abs() // bigDecimal(-12.3)
```
### floor(number)

@@ -150,0 +164,0 @@ Returns the whole number nearest but not greater than the input number.

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