Added npm reference.

This commit is contained in:
Michael Mclaughlin 2012-11-09 19:56:46 +00:00
parent e2c23b329c
commit 79abba4c24
1 changed files with 13 additions and 4 deletions

View File

@ -15,7 +15,7 @@ A Javascript library for arbitrary-precision arithmetic.
- No dependencies
- Comprehensive documentation and test set
If a smaller, simpler library is required see [big.js](https://github.com/MikeMcl/big.js/).
If an even smaller and simpler library is required see [big.js](https://github.com/MikeMcl/big.js/).
It's half the size with half the methods and only works with decimal numbers; it also does not allow `NaN` or `Infinity`, or have the configuration options of this library.
## Load
@ -36,6 +36,16 @@ For Node, put the *bignumber.js* file into the same directory as the file that i
or put it in a *node_modules* directory within the directory and use
var BigNumber = require('bignumber');
The library is also available from the [npm](https://npmjs.org/) registry, so
$ npm install bignumber.js
will install this entire directory in a *node_modules* directory within the current directory.
It can then be loaded with
var BigNumber = require('bignumber.js');
To load with AMD loader libraries such as [requireJS](http://requirejs.org/):
@ -159,7 +169,7 @@ The *perf* directory contains two applications and a *lib* directory containing
* ICU4J: com.ibm.icu.math.BigDecimal
<https://github.com/dtrebbien/BigDecimal.js>
The BigDecimal in Node's npm registry is the GWT version; unfortunately, it has serious bugs, see the Node script *perf/lib/bigdecimal_GWT/bugs.js for examples of flaws in its *remainder*, *divide* and *compareTo* methods.
The BigDecimal in Node's npm registry is the GWT version. Despite its seeming popularity I have found it to have some serious bugs, see the Node script *perf/lib/bigdecimal_GWT/bugs.js* for examples of flaws in its *remainder*, *divide* and *compareTo* methods.
*bigtime.js* is a Node command-line application which tests the performance of bignumber.js against the GWT version of BigDecimal from the npm registry.
@ -199,5 +209,4 @@ See LICENCE.
## Change Log
####1.0.0
* 8/11/2012 Initial release
* 9/11/12 Added package.json for npm
* 8/11/2012 Initial release