Skip to content

Commit

Permalink
Expose BigNumber used in numbro
Browse files Browse the repository at this point in the history
Fix #383
Allow users to configure BigNumber by exposing it as `numbro.BigNumber`.
  • Loading branch information
BenjaminVanRyseghem committed May 30, 2020
1 parent 4329409 commit c0eae82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fix #425: Fix interpretation of totalLength with negative numbers. Thanks @DamienCassou
- Fix #462: Fix negative number format issue. Thanks @bhartibdengada
- Fix #546: Format issue with average. Thanks @BenjaminVanRyseghem
- Fix #383: BigNumber Issue - new BigNumber() number type has more than 15 significant digits. Thanks @BenjaminVanRyseghem

### 2.2.0

Expand Down
3 changes: 2 additions & 1 deletion src/manipulating.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,6 @@ module.exports = numbro => ({
multiply: (n, other) => multiply(n, other, numbro),
divide: (n, other) => divide(n, other, numbro),
set: (n, other) => set(n, other, numbro),
difference: (n, other) => difference(n, other, numbro)
difference: (n, other) => difference(n, other, numbro),
BigNumber: BigNumber
});
1 change: 1 addition & 0 deletions src/numbro.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@ numbro.defaultCurrencyFormat = globalState.currentCurrencyDefaultFormat;
numbro.validate = validator.validate;
numbro.loadLanguagesInNode = loader.loadLanguagesInNode;
numbro.unformat = unformatter.unformat;
numbro.BigNumber = manipulate.BigNumber;

module.exports = numbro;

0 comments on commit c0eae82

Please sign in to comment.