mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-06 03:17:58 +00:00
1 line
2.1 KiB
Plaintext
1 line
2.1 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":[[7,2,15,0,"exports"],[7,9,15,0],[7,10,15,0,"stringShorten"],[7,23,15,0],[7,26,15,0,"stringShorten"],[7,39,15,0],[8,2,1,0],[9,0,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,0,6,0],[14,0,7,0],[15,0,8,0],[16,0,9,0],[17,0,10,0],[18,0,11,0],[19,0,12,0],[20,0,13,0],[21,0,14,0],[22,2,15,7],[22,11,15,16,"stringShorten"],[22,24,15,29,"stringShorten"],[22,25,15,30,"value"],[22,30,15,35],[22,32,15,37,"prefixLength"],[22,44,15,49],[22,47,15,52],[22,48,15,53],[22,50,15,55],[23,4,16,4],[23,11,16,11,"value"],[23,16,16,16],[23,17,16,17,"length"],[23,23,16,23],[23,27,16,27],[23,28,16,28],[23,31,16,31],[23,32,16,32],[23,35,16,35,"prefixLength"],[23,47,16,47],[23,50,17,10,"value"],[23,55,17,15],[23,56,17,16,"toString"],[23,64,17,24],[23,65,17,25],[23,66,17,26],[23,69,18,10],[23,72,18,13,"value"],[23,77,18,18],[23,78,18,19,"substring"],[23,87,18,28],[23,88,18,29],[23,89,18,30],[23,91,18,32,"prefixLength"],[23,103,18,44],[23,104,18,45],[23,108,18,49,"value"],[23,113,18,54],[23,114,18,55,"slice"],[23,119,18,60],[23,120,18,61],[23,121,18,62,"prefixLength"],[23,133,18,74],[23,134,18,75],[23,136,18,77],[24,2,19,0],[25,0,19,1],[25,3]],"functionMap":{"names":["<global>","stringShorten"],"mappings":"AAA;OCc;CDI"},"hasCjsExports":false},"type":"js/module"}]} |