mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 10:01:02 +00:00
1 line
2.8 KiB
Plaintext
1 line
2.8 KiB
Plaintext
{"dependencies":[{"name":"../hex/fixLength.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":51,"index":51}}],"key":"C9KE65KRBNG+IUGhKjyNCxciU/g=","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 var _hexFixLengthJs = 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, _hexFixLengthJs.hexFixLength)(hex.length % 2 ? `0${hex}` : hex, bitLength, true);\n }\n});","lineCount":28,"map":[[7,2,17,0,"exports"],[7,9,17,0],[7,10,17,0,"numberToHex"],[7,21,17,0],[7,24,17,0,"numberToHex"],[7,35,17,0],[8,2,1,0],[8,6,1,0,"_hexFixLengthJs"],[8,21,1,0],[8,24,1,0,"require"],[8,31,1,0],[8,32,1,0,"_dependencyMap"],[8,46,1,0],[9,2,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,0,15,0],[23,0,16,0],[24,2,17,7],[24,11,17,16,"numberToHex"],[24,22,17,27,"numberToHex"],[24,23,17,28,"value"],[24,28,17,33],[24,30,17,35,"bitLength"],[24,39,17,44],[24,42,17,47],[24,43,17,48],[24,44,17,49],[24,46,17,51],[25,4,18,4],[25,10,18,10,"hex"],[25,13,18,13],[25,16,18,16],[25,17,18,17],[25,18,18,18,"value"],[25,23,18,23],[25,27,18,27,"Number"],[25,33,18,33],[25,34,18,34,"isNaN"],[25,39,18,39],[25,40,18,40,"value"],[25,45,18,45],[25,46,18,46],[25,49,18,49],[25,50,18,50],[25,53,18,53,"value"],[25,58,18,58],[25,60,18,60,"toString"],[25,68,18,68],[25,69,18,69],[25,71,18,71],[25,72,18,72],[26,4,19,4],[26,11,19,11],[26,15,19,11,"hexFixLength"],[26,30,19,23],[26,31,19,23,"hexFixLength"],[26,43,19,23],[26,45,19,24,"hex"],[26,48,19,27],[26,49,19,28,"length"],[26,55,19,34],[26,58,19,37],[26,59,19,38],[26,62,19,41],[26,66,19,45,"hex"],[26,69,19,48],[26,71,19,50],[26,74,19,53,"hex"],[26,77,19,56],[26,79,19,58,"bitLength"],[26,88,19,67],[26,90,19,69],[26,94,19,73],[26,95,19,74],[27,2,20,0],[28,0,20,1],[28,3]],"functionMap":{"names":["<global>","numberToHex"],"mappings":"AAA;OCgB;CDG"},"hasCjsExports":false},"type":"js/module"}]} |