UNPKG

stash-connector

Version:

Module to handle and work with Atlassian Stash projects and repositories throug REST API. Admin your repositories and projects in Stash easy. This project is not an Atlassian official project but use the Atlassian Stash REST API

23 lines 855 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MathUtils = void 0; var MathUtils = /** @class */ (function () { function MathUtils() { } /** * Method to round a number with a selected decimal precission. By default, round with two decimals * @param {number} number Number to round * @param {number} [decimalNumbers] Decimal numbers precission * * @returns {number} Returns a rounded number with the specified decimals */ MathUtils.round = function (number, decimalNumbers) { if (!decimalNumbers) { decimalNumbers = 2; } return Number(Math.round(Number(number + 'e' + decimalNumbers)) + 'e-' + decimalNumbers); }; return MathUtils; }()); exports.MathUtils = MathUtils; //# sourceMappingURL=mathUtils.js.map