/npm-bignumber.js

TypeScript definitions for bignumber.js 💯

Primary LanguageTypeScript

Typed bignumber.js

Greenkeeper badge Build Status

Typescript Typings for bignumber.js.

Installation

typings install --save bignumber.js

Usage

import BigNumber from 'bignumber.js';

const x = new BigNumber(0.1);
const y = x.plus(0.2);               // '0.3'
new BigNumber(0.7).plus(x).plus(y);  // '1'
x.plus('0.1', 8);                    // '0.225'

Contributing

The tests use examples from the docs. You can run them by running npm run build and npm run test.