mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 06:31:03 +00:00
1 line
2.5 KiB
Plaintext
1 line
2.5 KiB
Plaintext
{"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":[[7,2,6,0,"exports"],[7,9,6,0],[7,10,6,0,"formatDecimal"],[7,23,6,0],[7,26,6,0,"formatDecimal"],[7,39,6,0],[8,2,1,0],[8,8,1,6,"NUMBER_REGEX"],[8,20,1,18],[8,23,1,21],[8,27,1,25,"RegExp"],[8,33,1,31],[8,34,1,32],[8,65,1,63],[8,67,1,65],[8,70,1,68],[8,71,1,69],[9,2,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,2,6,7],[13,11,6,16,"formatDecimal"],[13,24,6,29,"formatDecimal"],[13,25,6,30,"value"],[13,30,6,35],[13,32,6,37,"separator"],[13,41,6,46],[13,44,6,49],[13,47,6,52],[13,49,6,54],[14,4,7,4],[15,4,8,4],[16,4,9,4],[16,10,9,10,"isNegative"],[16,20,9,20],[16,23,9,23,"value"],[16,28,9,28],[16,29,9,29],[16,30,9,30],[16,31,9,31],[16,32,9,32,"startsWith"],[16,42,9,42],[16,43,9,43],[16,46,9,46],[16,47,9,47],[17,4,10,4],[17,10,10,10,"matched"],[17,17,10,17],[17,20,10,20,"isNegative"],[17,30,10,30],[17,33,11,10,"value"],[17,38,11,15],[17,39,11,16,"substring"],[17,48,11,25],[17,49,11,26],[17,50,11,27],[17,51,11,28],[17,52,11,29,"match"],[17,57,11,34],[17,58,11,35,"NUMBER_REGEX"],[17,70,11,47],[17,71,11,48],[17,74,12,10,"value"],[17,79,12,15],[17,80,12,16,"match"],[17,85,12,21],[17,86,12,22,"NUMBER_REGEX"],[17,98,12,34],[17,99,12,35],[18,4,13,4],[18,11,13,11,"matched"],[18,18,13,18],[18,21,14,10],[18,24,14,13,"isNegative"],[18,34,14,23],[18,37,14,26],[18,40,14,29],[18,43,14,32],[18,45,14,34],[18,48,14,37,"matched"],[18,55,14,44],[18,56,14,45,"join"],[18,60,14,49],[18,61,14,50,"separator"],[18,70,14,59],[18,71,14,60],[18,73,14,62],[18,76,15,10,"value"],[18,81,15,15],[19,2,16,0],[20,0,16,1],[20,3]],"functionMap":{"names":["<global>","formatDecimal"],"mappings":"AAA;OCK;CDU"},"hasCjsExports":false},"type":"js/module"}]} |