mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 21:31:02 +00:00
1 line
2.4 KiB
Plaintext
1 line
2.4 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) {\n var prefixLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;\n return value.length <= 2 + 2 * prefixLength ? value.toString() : `${value.substring(0, prefixLength)}…${value.slice(-prefixLength)}`;\n }\n});","lineCount":26,"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,55],[23,4,15,55],[23,8,15,37,"prefixLength"],[23,20,15,49],[23,23,15,49,"arguments"],[23,32,15,49],[23,33,15,49,"length"],[23,39,15,49],[23,47,15,49,"arguments"],[23,56,15,49],[23,64,15,49,"undefined"],[23,73,15,49],[23,76,15,49,"arguments"],[23,85,15,49],[23,91,15,52],[23,92,15,53],[24,4,16,4],[24,11,16,11,"value"],[24,16,16,16],[24,17,16,17,"length"],[24,23,16,23],[24,27,16,27],[24,28,16,28],[24,31,16,31],[24,32,16,32],[24,35,16,35,"prefixLength"],[24,47,16,47],[24,50,17,10,"value"],[24,55,17,15],[24,56,17,16,"toString"],[24,64,17,24],[24,65,17,25],[24,66,17,26],[24,69,18,10],[24,72,18,13,"value"],[24,77,18,18],[24,78,18,19,"substring"],[24,87,18,28],[24,88,18,29],[24,89,18,30],[24,91,18,32,"prefixLength"],[24,103,18,44],[24,104,18,45],[24,108,18,49,"value"],[24,113,18,54],[24,114,18,55,"slice"],[24,119,18,60],[24,120,18,61],[24,121,18,62,"prefixLength"],[24,133,18,74],[24,134,18,75],[24,136,18,77],[25,2,19,0],[26,0,19,1],[26,3]],"functionMap":{"names":["<global>","stringShorten"],"mappings":"AAA;OCc;CDI"},"hasCjsExports":false},"type":"js/module"}]} |