1.0.1 • Published 4 years ago
@easymoney/bignumber.js v1.0.1
@easymoney/bignumber.js
]david-bignumber]pho-bignumber
Install
npm install @easymoney/bignumber.js
or
yarn add @easymoney/bignumber.js
or
CDN
Usage
import { createBigNumberMoney } from '@easymoney/bignumber.js';
const money = createBigNumberMoney({ amount: "111222333344445566677889999", currency: 'USD' });
const money2 = createBigNumberMoney({ amount: 100, currency: 'USD' });
const result = money.add(money2);
result.getAmount();
// => "111122223333444455556666777788890099"
import { createBigNumberMoney } from '@easymoney/bignumber.js';
const money = createBigNumberMoney({ amount: "-222333444111155666677788899", currency: 'USD' });
const money1 = createBigNumberMoney({ amount: -100, currency: 'USD' });
const result = money.absolute();
// => "222333444111155666677788899"
const result1 = money1.absolute();
// => "100"
1.0.1
4 years ago
1.0.1-rc.1
4 years ago
1.0.1-rc.2
4 years ago
1.0.1-rc.0
4 years ago
1.0.0
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago