mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
2.3 KiB
Plaintext
1 line
2.3 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.stringShorten = stringShorten;\n /**\n * @name stringShorten\n * @summary Returns a string with maximum length\n * @description\n * Checks the string against the `prefixLength`, if longer than double this, shortens it by placing `..` in the middle of it\n * @example\n * <BR>\n *\n * ```javascript\n * import { stringShorten } from '@polkadot/util';\n *\n * stringShorten('1234567890', 2); // => 12..90\n * ```\n */\n function stringShorten(value, prefixLength = 6) {\n return value.length <= 2 + 2 * prefixLength ? value.toString() : `${value.substring(0, prefixLength)}…${value.slice(-prefixLength)}`;\n }\n});","lineCount":25,"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,"stringShorten"],[7,23,3,21],[7,26,3,24,"stringShorten"],[7,39,3,37],[8,2,4,0],[9,0,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,2,18,0],[22,11,18,9,"stringShorten"],[22,24,18,22,"stringShorten"],[22,25,18,23,"value"],[22,30,18,28],[22,32,18,30,"prefixLength"],[22,44,18,42],[22,47,18,45],[22,48,18,46],[22,50,18,48],[23,4,19,4],[23,11,19,11,"value"],[23,16,19,16],[23,17,19,17,"length"],[23,23,19,23],[23,27,19,27],[23,28,19,28],[23,31,19,31],[23,32,19,32],[23,35,19,35,"prefixLength"],[23,47,19,47],[23,50,20,10,"value"],[23,55,20,15],[23,56,20,16,"toString"],[23,64,20,24],[23,65,20,25],[23,66,20,26],[23,69,21,10],[23,72,21,13,"value"],[23,77,21,18],[23,78,21,19,"substring"],[23,87,21,28],[23,88,21,29],[23,89,21,30],[23,91,21,32,"prefixLength"],[23,103,21,44],[23,104,21,45],[23,108,21,49,"value"],[23,113,21,54],[23,114,21,55,"slice"],[23,119,21,60],[23,120,21,61],[23,121,21,62,"prefixLength"],[23,133,21,74],[23,134,21,75],[23,136,21,77],[24,2,22,0],[25,0,22,1],[25,3]],"functionMap":{"names":["<global>","stringShorten"],"mappings":"AAA;ACiB;CDI"},"hasCjsExports":true},"type":"js/module"}]} |