fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
1 lines • 637 B
Source Map (JSON)
{"version":3,"file":"toFixed.min.mjs","sources":["../../../../src/util/misc/toFixed.ts"],"sourcesContent":["/**\n * A wrapper around Number#toFixed, which contrary to native method returns number, not string.\n * @param {number|string} number number to operate on\n * @param {number} fractionDigits number of fraction digits to \"leave\"\n * @return {number}\n */\nexport const toFixed = (number: number | string, fractionDigits: number) =>\n parseFloat(Number(number).toFixed(fractionDigits));\n"],"names":["toFixed","number","fractionDigits","parseFloat","Number"],"mappings":"MAMaA,EAAUA,CAACC,EAAyBC,IAC/CC,WAAWC,OAAOH,GAAQD,QAAQE"}