1 | var fixedBase = function (v, base) {
|
2 | var str = base.toString();
|
3 | var index = str.indexOf('.');
|
4 | if (index === -1) {
|
5 | return Math.round(v);
|
6 | }
|
7 | var length = str.substr(index + 1).length;
|
8 | if (length > 20) {
|
9 | length = 20;
|
10 | }
|
11 | return parseFloat(v.toFixed(length));
|
12 | };
|
13 | export default fixedBase;
|
14 | //# sourceMappingURL=fixed-base.js.map |
\ | No newline at end of file |