This library handles the basic mathematics operation between 2 numbers. These numbers can be of large digits like 100 digits or can be 1 or 2 digit number. Number can be also be alpha numeric like base 16 or base 36 numbers. It also supports conversion from one numeral system to another.
npm i bignumeric
pnpm i bignumeric
yarn add bignumeric
import { Bignum, NumeralSystem } from 'bignumeric';
const num1 = Bignum.parse('234.67', NumeralSystem.Base10);
const num2 = Bignum.parse('42.077', NumeralSystem.Base10);
const sum = num1.add(num2);
console.log(sum.toString()); // 276.747
Note Check Bignum.md and NumeralSystem.md for more details
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -m 'your commit message'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😎
pnpm install
pnpm build
pnpm test