{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.formatDecimal = formatDecimal;\n const NUMBER_REGEX = new RegExp('(\\\\d+?)(?=(\\\\d{3})+(?!\\\\d)|$)', 'g');\n /**\n * @name formatDecimal\n * @description Formats a number into string format with thousand separators\n */\n function formatDecimal(value, separator = ',') {\n // We can do this by adjusting the regx, however for the sake of clarity\n // we rather strip and re-add the negative sign in the output\n const isNegative = value[0].startsWith('-');\n const matched = isNegative ? value.substring(1).match(NUMBER_REGEX) : value.match(NUMBER_REGEX);\n return matched ? `${isNegative ? '-' : ''}${matched.join(separator)}` : value;\n }\n});","lineCount":20,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"formatDecimal"],[7,23,3,21],[7,26,3,24,"formatDecimal"],[7,39,3,37],[8,2,4,0],[8,8,4,6,"NUMBER_REGEX"],[8,20,4,18],[8,23,4,21],[8,27,4,25,"RegExp"],[8,33,4,31],[8,34,4,32],[8,65,4,63],[8,67,4,65],[8,70,4,68],[8,71,4,69],[9,2,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,2,9,0],[13,11,9,9,"formatDecimal"],[13,24,9,22,"formatDecimal"],[13,25,9,23,"value"],[13,30,9,28],[13,32,9,30,"separator"],[13,41,9,39],[13,44,9,42],[13,47,9,45],[13,49,9,47],[14,4,10,4],[15,4,11,4],[16,4,12,4],[16,10,12,10,"isNegative"],[16,20,12,20],[16,23,12,23,"value"],[16,28,12,28],[16,29,12,29],[16,30,12,30],[16,31,12,31],[16,32,12,32,"startsWith"],[16,42,12,42],[16,43,12,43],[16,46,12,46],[16,47,12,47],[17,4,13,4],[17,10,13,10,"matched"],[17,17,13,17],[17,20,13,20,"isNegative"],[17,30,13,30],[17,33,14,10,"value"],[17,38,14,15],[17,39,14,16,"substring"],[17,48,14,25],[17,49,14,26],[17,50,14,27],[17,51,14,28],[17,52,14,29,"match"],[17,57,14,34],[17,58,14,35,"NUMBER_REGEX"],[17,70,14,47],[17,71,14,48],[17,74,15,10,"value"],[17,79,15,15],[17,80,15,16,"match"],[17,85,15,21],[17,86,15,22,"NUMBER_REGEX"],[17,98,15,34],[17,99,15,35],[18,4,16,4],[18,11,16,11,"matched"],[18,18,16,18],[18,21,17,10],[18,24,17,13,"isNegative"],[18,34,17,23],[18,37,17,26],[18,40,17,29],[18,43,17,32],[18,45,17,34],[18,48,17,37,"matched"],[18,55,17,44],[18,56,17,45,"join"],[18,60,17,49],[18,61,17,50,"separator"],[18,70,17,59],[18,71,17,60],[18,73,17,62],[18,76,18,10,"value"],[18,81,18,15],[19,2,19,0],[20,0,19,1],[20,3]],"functionMap":{"names":["","formatDecimal"],"mappings":"AAA;ACQ;CDU"},"hasCjsExports":true},"type":"js/module"}]}