mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 11:11:01 +00:00
1 line
3.5 KiB
Plaintext
1 line
3.5 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 Object.defineProperty(exports, \"REGEX_HEX_PREFIXED\", {\n enumerable: true,\n get: function () {\n return REGEX_HEX_PREFIXED;\n }\n });\n Object.defineProperty(exports, \"REGEX_HEX_NOPREFIX\", {\n enumerable: true,\n get: function () {\n return REGEX_HEX_NOPREFIX;\n }\n });\n exports.isHex = isHex;\n const REGEX_HEX_PREFIXED = /^0x[\\da-fA-F]+$/;\n const REGEX_HEX_NOPREFIX = /^[\\da-fA-F]+$/;\n /**\n * @name isHex\n * @summary Tests for a hex string.\n * @description\n * Checks to see if the input value is a `0x` prefixed hex string. Optionally (`bitLength` !== -1) checks to see if the bitLength is correct.\n * @example\n * <BR>\n *\n * ```javascript\n * import { isHex } from '@polkadot/util';\n *\n * isHex('0x1234'); // => true\n * isHex('0x1234', 8); // => false\n * ```\n */\n function isHex(value, bitLength = -1, ignoreLength) {\n return typeof value === 'string' && (value === '0x' || REGEX_HEX_PREFIXED.test(value)) && (bitLength === -1 ? ignoreLength || value.length % 2 === 0 : value.length === 2 + Math.ceil(bitLength / 4));\n }\n});","lineCount":40,"map":[[7,2,1,0,"Object"],[7,8,1,0],[7,9,1,0,"defineProperty"],[7,23,1,0],[7,24,1,0,"exports"],[7,31,1,0],[8,4,1,0,"enumerable"],[8,14,1,0],[9,4,1,0,"get"],[9,7,1,0],[9,18,1,0,"get"],[9,19,1,0],[10,6,1,0],[10,13,1,0,"REGEX_HEX_PREFIXED"],[10,31,1,0],[11,4,1,0],[12,2,1,0],[13,2,2,0,"Object"],[13,8,2,0],[13,9,2,0,"defineProperty"],[13,23,2,0],[13,24,2,0,"exports"],[13,31,2,0],[14,4,2,0,"enumerable"],[14,14,2,0],[15,4,2,0,"get"],[15,7,2,0],[15,18,2,0,"get"],[15,19,2,0],[16,6,2,0],[16,13,2,0,"REGEX_HEX_NOPREFIX"],[16,31,2,0],[17,4,2,0],[18,2,2,0],[19,2,18,0,"exports"],[19,9,18,0],[19,10,18,0,"isHex"],[19,15,18,0],[19,18,18,0,"isHex"],[19,23,18,0],[20,2,1,7],[20,8,1,13,"REGEX_HEX_PREFIXED"],[20,26,1,31],[20,29,1,34],[20,46,1,51],[21,2,2,7],[21,8,2,13,"REGEX_HEX_NOPREFIX"],[21,26,2,31],[21,29,2,34],[21,44,2,49],[22,2,3,0],[23,0,4,0],[24,0,5,0],[25,0,6,0],[26,0,7,0],[27,0,8,0],[28,0,9,0],[29,0,10,0],[30,0,11,0],[31,0,12,0],[32,0,13,0],[33,0,14,0],[34,0,15,0],[35,0,16,0],[36,0,17,0],[37,2,18,7],[37,11,18,16,"isHex"],[37,16,18,21,"isHex"],[37,17,18,22,"value"],[37,22,18,27],[37,24,18,29,"bitLength"],[37,33,18,38],[37,36,18,41],[37,37,18,42],[37,38,18,43],[37,40,18,45,"ignoreLength"],[37,52,18,57],[37,54,18,59],[38,4,19,4],[38,11,19,12],[38,18,19,19,"value"],[38,23,19,24],[38,28,19,29],[38,36,19,37],[38,41,19,42,"value"],[38,46,19,47],[38,51,19,52],[38,55,19,56],[38,59,20,8,"REGEX_HEX_PREFIXED"],[38,77,20,26],[38,78,20,27,"test"],[38,82,20,31],[38,83,20,32,"value"],[38,88,20,37],[38,89,20,38],[38,90,20,39],[38,95,20,45,"bitLength"],[38,104,20,54],[38,109,20,59],[38,110,20,60],[38,111,20,61],[38,114,21,11,"ignoreLength"],[38,126,21,23],[38,130,21,28,"value"],[38,135,21,33],[38,136,21,34,"length"],[38,142,21,40],[38,145,21,43],[38,146,21,44],[38,151,21,49],[38,152,21,51],[38,155,22,11,"value"],[38,160,22,16],[38,161,22,17,"length"],[38,167,22,23],[38,172,22,29],[38,173,22,30],[38,176,22,33,"Math"],[38,180,22,37],[38,181,22,38,"ceil"],[38,185,22,42],[38,186,22,43,"bitLength"],[38,195,22,52],[38,198,22,55],[38,199,22,56],[38,200,22,59],[38,201,22,60],[39,2,23,0],[40,0,23,1],[40,3]],"functionMap":{"names":["<global>","isHex"],"mappings":"AAA;OCiB;CDK"},"hasCjsExports":false},"type":"js/module"}]} |