mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 16:51:02 +00:00
1 line
3.1 KiB
Plaintext
1 line
3.1 KiB
Plaintext
{"dependencies":[{"name":"../hex/fixLength.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":23,"index":135},"end":{"line":4,"column":53,"index":165}}],"key":"JGbq3J3H6loRH/OUC462GTdKGhc=","exportNames":["*"],"imports":1}}],"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.numberToHex = numberToHex;\n const fixLength_js_1 = require(_dependencyMap[0], \"../hex/fixLength.js\");\n /**\n * @name numberToHex\n * @summary Creates a hex value from a number.\n * @description\n * `null`/`undefined`/`NaN` inputs returns an empty `0x` result. `number` input values return the actual bytes value converted to a `hex`. With `bitLength` set, it converts the number to the equivalent size.\n * @example\n * <BR>\n *\n * ```javascript\n * import { numberToHex } from '@polkadot/util';\n *\n * numberToHex(0x1234); // => '0x1234'\n * numberToHex(0x1234, 32); // => 0x00001234\n * ```\n */\n function numberToHex(value, bitLength = -1) {\n const hex = (!value || Number.isNaN(value) ? 0 : value).toString(16);\n return (0, fixLength_js_1.hexFixLength)(hex.length % 2 ? `0${hex}` : hex, bitLength, true);\n }\n});","lineCount":28,"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,"numberToHex"],[7,21,3,19],[7,24,3,22,"numberToHex"],[7,35,3,33],[8,2,4,0],[8,8,4,6,"fixLength_js_1"],[8,22,4,20],[8,25,4,23,"require"],[8,32,4,30],[8,33,4,30,"_dependencyMap"],[8,47,4,30],[8,73,4,52],[8,74,4,53],[9,2,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,0,18,0],[23,0,19,0],[24,2,20,0],[24,11,20,9,"numberToHex"],[24,22,20,20,"numberToHex"],[24,23,20,21,"value"],[24,28,20,26],[24,30,20,28,"bitLength"],[24,39,20,37],[24,42,20,40],[24,43,20,41],[24,44,20,42],[24,46,20,44],[25,4,21,4],[25,10,21,10,"hex"],[25,13,21,13],[25,16,21,16],[25,17,21,17],[25,18,21,18,"value"],[25,23,21,23],[25,27,21,27,"Number"],[25,33,21,33],[25,34,21,34,"isNaN"],[25,39,21,39],[25,40,21,40,"value"],[25,45,21,45],[25,46,21,46],[25,49,21,49],[25,50,21,50],[25,53,21,53,"value"],[25,58,21,58],[25,60,21,60,"toString"],[25,68,21,68],[25,69,21,69],[25,71,21,71],[25,72,21,72],[26,4,22,4],[26,11,22,11],[26,12,22,12],[26,13,22,13],[26,15,22,15,"fixLength_js_1"],[26,29,22,29],[26,30,22,30,"hexFixLength"],[26,42,22,42],[26,44,22,44,"hex"],[26,47,22,47],[26,48,22,48,"length"],[26,54,22,54],[26,57,22,57],[26,58,22,58],[26,61,22,61],[26,65,22,65,"hex"],[26,68,22,68],[26,70,22,70],[26,73,22,73,"hex"],[26,76,22,76],[26,78,22,78,"bitLength"],[26,87,22,87],[26,89,22,89],[26,93,22,93],[26,94,22,94],[27,2,23,0],[28,0,23,1],[28,3]],"functionMap":{"names":["<global>","numberToHex"],"mappings":"AAA;ACmB;CDG"},"hasCjsExports":true},"type":"js/module"}]} |