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

bignumber.js

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bignumber.js - npm Package Compare versions

Comparing version 9.0.1 to 9.0.2

6

CHANGELOG.md

@@ -0,1 +1,7 @@

#### 9.0.2
* 12/12/21
* #250 [BUGFIX] Allow use of user-defined alphabet for base 10.
* #295 Remove *bignumber.min.js* and amend *README.md*.
* Update *.travis.yml* and *LICENCE.md*.
#### 9.0.1

@@ -2,0 +8,0 @@ * 28/09/20

2

LICENCE.md
The MIT License (MIT)
=====================
Copyright © `<2020>` `Michael Mclaughlin`
Copyright © `<2021>` `Michael Mclaughlin`

@@ -6,0 +6,0 @@ Permission is hereby granted, free of charge, to any person

{
"name": "bignumber.js",
"description": "A library for arbitrary-precision decimal and non-decimal arithmetic",
"version": "9.0.1",
"version": "9.0.2",
"keywords": [

@@ -36,6 +36,5 @@ "arbitrary",

"scripts": {
"test": "node test/test",
"build": "uglifyjs bignumber.js --source-map -c -m -o bignumber.min.js"
"test": "node test/test"
},
"dependencies": {}
}

@@ -7,3 +7,2 @@ ![bignumber.js](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/bignumberjs.png)

[![npm downloads](https://img.shields.io/npm/dw/bignumber.js)](https://www.npmjs.com/package/bignumber.js)
[![build status](https://travis-ci.org/MikeMcl/bignumber.js.svg)](https://travis-ci.org/MikeMcl/bignumber.js)

@@ -29,3 +28,3 @@ <br />

It's less than half the size but only works with decimal numbers and only has half the methods.
It also does not allow `NaN` or `Infinity`, or have the configuration options of this library.
It also has fewer configuration options than this library, and does not allow `NaN` or `Infinity`.

@@ -38,3 +37,3 @@ See also [decimal.js](https://github.com/MikeMcl/decimal.js/), which among other things adds support for non-integer powers, and performs all operations to a specified number of significant digits.

### Browser:
### Browser

@@ -50,10 +49,14 @@ ```html

import BigNumber from './path/to/bignumber.mjs';
...
</script>
```
### [Node.js](http://nodejs.org):
> Get a minified version from a CDN:
```html
<script src='https://cdn.jsdelivr.net/npm/bignumber.js@9.0.2/bignumber.min.js'></script>
```
### [Node.js](http://nodejs.org)
```bash
$ npm install bignumber.js
npm install bignumber.js
```

@@ -69,6 +72,15 @@

import BigNumber from "bignumber.js";
// or
// or maybe
import { BigNumber } from "bignumber.js";
// else
import { BigNumber } from "./node_modules/bignumber.js/bignumber.mjs";
```
### [Deno](https://deno.land/)
```javascript
import BigNumber from 'https://raw.githubusercontent.com/mikemcl/bignumber.js/v9.0.2/bignumber.mjs';
import BigNumber from 'https://unpkg.com/bignumber.js@latest/bignumber.mjs';
```
## Use

@@ -125,3 +137,3 @@

*Performance is better if base 10 is NOT specified for decimal values. Only specify base 10 when it is desired that the number of decimal places of the input value be limited to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.*
*Performance is better if base 10 is NOT specified for decimal values. Only specify base 10 when you want to limit the number of decimal places of the input value to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.*

@@ -163,3 +175,3 @@ A BigNumber is immutable in the sense that it is not changed by its methods.

*Performance is better if base 10 is NOT specified, i.e. use `toString()` not `toString(10)`. Only specify base 10 when it is desired that the number of decimal places be limited to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.*
*Performance is better if base 10 is NOT specified, i.e. use `toString()` not `toString(10)`. Only specify base 10 when you want to limit the number of decimal places of the string to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.*

@@ -220,3 +232,3 @@ ```javascript

For advanced usage, multiple BigNumber constructors can be created, each with their own independent configuration.
For advanced usage, multiple BigNumber constructors can be created, each with its own independent configuration.

@@ -251,28 +263,32 @@ ```javascript

$ npm test
```bash
npm test
```
or
$ node test/test
```bash
node test/test
```
To test a single method, use, for example
$ node test/methods/toFraction
```bash
node test/methods/toFraction
```
For the browser, open *test/test.html*.
## Build
## Minify
For Node, if [uglify-js](https://github.com/mishoo/UglifyJS2) is installed
To minify using, for example, [terser](https://github.com/terser/terser)
npm install uglify-js -g
```bash
npm install -g terser
```
then
```bash
terser big.js -c -m -o big.min.js
```
npm run build
will create *bignumber.min.js*.
A source map will also be created in the root directory.
## Licence

@@ -279,0 +295,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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