Skip to content

Commit

Permalink
Release. Bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Losev committed Sep 7, 2023
1 parent 364b70b commit 516dc77
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@barchart/common-js",
"version": "4.32.0",
"version": "4.33.0",
"description": "Library of common JavaScript utilities",
"author": {
"name": "Bryan Ingle",
Expand Down
19 changes: 19 additions & 0 deletions test/SpecRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2913,6 +2913,18 @@ module.exports = (() => {
return new Decimal(this._big.round(places, modeToUse.value));
}

/**
* Returns a new {@link Decimal} instance with a value that returns
* the remainder of dividing by the value supplied.
*
* @public
* @param {Decimal|Number|String} other
* @returns {Decimal}
*/
mod(other) {
return new Decimal(this._big.mod(getBig(other)));
}

/**
* Returns a new {@link Decimal} instance having the absolute value of
* the current instance's value.
Expand Down Expand Up @@ -19500,6 +19512,13 @@ describe('When instantiating a Decimal', () => {
}).toThrow();
});
});
describe('and modulo by zero', () => {
it('should throw', () => {
expect(() => {
let e = d.mod(0);
}).toThrow();
});
});
});
describe('from the string "1"', () => {
let d;
Expand Down

0 comments on commit 516dc77

Please sign in to comment.