UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

13 lines 438 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bigint2number = bigint2number; exports.roundToDecimals = roundToDecimals; function bigint2number(a) { // we have to remove the trailing `n` return Number(String(a).slice(0, -1)); } function roundToDecimals(value, decimals) { const factor = 10 ** decimals; return Math.round(value * factor) / factor; } //# sourceMappingURL=numbers.js.map