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