UNPKG

448 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var fixedBase = function (v, base) {
4 var str = base.toString();
5 var index = str.indexOf('.');
6 if (index === -1) {
7 return Math.round(v);
8 }
9 var length = str.substr(index + 1).length;
10 if (length > 20) {
11 length = 20;
12 }
13 return parseFloat(v.toFixed(length));
14};
15exports.default = fixedBase;
16//# sourceMappingURL=fixed-base.js.map
\No newline at end of file