mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 20:21:01 +00:00
1 line
3.0 KiB
Plaintext
1 line
3.0 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 var 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) {\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ',';\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 var isNegative = value[0].startsWith('-');\n var matched = isNegative ? value.substring(1).match(NUMBER_REGEX) : value.match(NUMBER_REGEX);\n return matched ? `${isNegative ? '-' : ''}${matched.join(separator)}` : value;\n }\n});","lineCount":21,"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,6,4,6,"NUMBER_REGEX"],[8,18,4,18],[8,21,4,21],[8,25,4,25,"RegExp"],[8,31,4,31],[8,32,4,32],[8,63,4,63],[8,65,4,65],[8,68,4,68],[8,69,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,47],[14,4,9,47],[14,8,9,30,"separator"],[14,17,9,39],[14,20,9,39,"arguments"],[14,29,9,39],[14,30,9,39,"length"],[14,36,9,39],[14,44,9,39,"arguments"],[14,53,9,39],[14,61,9,39,"undefined"],[14,70,9,39],[14,73,9,39,"arguments"],[14,82,9,39],[14,88,9,42],[14,91,9,45],[15,4,10,4],[16,4,11,4],[17,4,12,4],[17,8,12,10,"isNegative"],[17,18,12,20],[17,21,12,23,"value"],[17,26,12,28],[17,27,12,29],[17,28,12,30],[17,29,12,31],[17,30,12,32,"startsWith"],[17,40,12,42],[17,41,12,43],[17,44,12,46],[17,45,12,47],[18,4,13,4],[18,8,13,10,"matched"],[18,15,13,17],[18,18,13,20,"isNegative"],[18,28,13,30],[18,31,14,10,"value"],[18,36,14,15],[18,37,14,16,"substring"],[18,46,14,25],[18,47,14,26],[18,48,14,27],[18,49,14,28],[18,50,14,29,"match"],[18,55,14,34],[18,56,14,35,"NUMBER_REGEX"],[18,68,14,47],[18,69,14,48],[18,72,15,10,"value"],[18,77,15,15],[18,78,15,16,"match"],[18,83,15,21],[18,84,15,22,"NUMBER_REGEX"],[18,96,15,34],[18,97,15,35],[19,4,16,4],[19,11,16,11,"matched"],[19,18,16,18],[19,21,17,10],[19,24,17,13,"isNegative"],[19,34,17,23],[19,37,17,26],[19,40,17,29],[19,43,17,32],[19,45,17,34],[19,48,17,37,"matched"],[19,55,17,44],[19,56,17,45,"join"],[19,60,17,49],[19,61,17,50,"separator"],[19,70,17,59],[19,71,17,60],[19,73,17,62],[19,76,18,10,"value"],[19,81,18,15],[20,2,19,0],[21,0,19,1],[21,3]],"functionMap":{"names":["<global>","formatDecimal"],"mappings":"AAA;ACQ;CDU"},"hasCjsExports":true},"type":"js/module"}]} |