mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 11:11:01 +00:00
1 line
4.2 KiB
Plaintext
1 line
4.2 KiB
Plaintext
{"dependencies":[{"name":"./toU8a.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}}],"key":"3bOyH77e/8Wc8K55bqHxvmXdM0A=","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.u8aCmp = u8aCmp;\n var _toU8aJs = require(_dependencyMap[0], \"./toU8a.js\");\n /**\n * @name u8aCmp\n * @summary Compares two Uint8Arrays for sorting.\n * @description\n * For `UInt8Array` (or hex string) input values returning -1, 0 or +1\n * @example\n * <BR>\n *\n * ```javascript\n * import { u8aCmp } from '@polkadot/util';\n *\n * u8aCmp(new Uint8Array([0x67, 0x65]), new Uint8Array([0x68, 0x65])); // -1\n * u8aCmp(new Uint8Array([0x68, 0x65]), new Uint8Array([0x68, 0x65])); // 0\n * u8aCmp(new Uint8Array([0x69, 0x65]), new Uint8Array([0x68, 0x65])); // +1\n * ```\n */\n function u8aCmp(a, b) {\n var u8aa = (0, _toU8aJs.u8aToU8a)(a);\n var u8ab = (0, _toU8aJs.u8aToU8a)(b);\n var i = 0;\n while (true) {\n var overA = i >= u8aa.length;\n var overB = i >= u8ab.length;\n if (overA && overB) {\n // both ends reached\n return 0;\n } else if (overA) {\n // a has no more data, b has data\n return -1;\n } else if (overB) {\n // b has no more data, a has data\n return 1;\n } else if (u8aa[i] !== u8ab[i]) {\n // the number in this index doesn't match\n // (we don't use u8aa[i] - u8ab[i] since that doesn't match with localeCompare)\n return u8aa[i] > u8ab[i] ? 1 : -1;\n }\n i++;\n }\n }\n});","lineCount":49,"map":[[7,2,18,0,"exports"],[7,9,18,0],[7,10,18,0,"u8aCmp"],[7,16,18,0],[7,19,18,0,"u8aCmp"],[7,25,18,0],[8,2,1,0],[8,6,1,0,"_toU8aJs"],[8,14,1,0],[8,17,1,0,"require"],[8,24,1,0],[8,25,1,0,"_dependencyMap"],[8,39,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,0,17,0],[25,2,18,7],[25,11,18,16,"u8aCmp"],[25,17,18,22,"u8aCmp"],[25,18,18,23,"a"],[25,19,18,24],[25,21,18,26,"b"],[25,22,18,27],[25,24,18,29],[26,4,19,4],[26,8,19,10,"u8aa"],[26,12,19,14],[26,15,19,17],[26,19,19,17,"u8aToU8a"],[26,27,19,25],[26,28,19,25,"u8aToU8a"],[26,36,19,25],[26,38,19,26,"a"],[26,39,19,27],[26,40,19,28],[27,4,20,4],[27,8,20,10,"u8ab"],[27,12,20,14],[27,15,20,17],[27,19,20,17,"u8aToU8a"],[27,27,20,25],[27,28,20,25,"u8aToU8a"],[27,36,20,25],[27,38,20,26,"b"],[27,39,20,27],[27,40,20,28],[28,4,21,4],[28,8,21,8,"i"],[28,9,21,9],[28,12,21,12],[28,13,21,13],[29,4,22,4],[29,11,22,11],[29,15,22,15],[29,17,22,17],[30,6,23,8],[30,10,23,14,"overA"],[30,15,23,19],[30,18,23,22,"i"],[30,19,23,23],[30,23,23,27,"u8aa"],[30,27,23,31],[30,28,23,32,"length"],[30,34,23,38],[31,6,24,8],[31,10,24,14,"overB"],[31,15,24,19],[31,18,24,22,"i"],[31,19,24,23],[31,23,24,27,"u8ab"],[31,27,24,31],[31,28,24,32,"length"],[31,34,24,38],[32,6,25,8],[32,10,25,12,"overA"],[32,15,25,17],[32,19,25,21,"overB"],[32,24,25,26],[32,26,25,28],[33,8,26,12],[34,8,27,12],[34,15,27,19],[34,16,27,20],[35,6,28,8],[35,7,28,9],[35,13,29,13],[35,17,29,17,"overA"],[35,22,29,22],[35,24,29,24],[36,8,30,12],[37,8,31,12],[37,15,31,19],[37,16,31,20],[37,17,31,21],[38,6,32,8],[38,7,32,9],[38,13,33,13],[38,17,33,17,"overB"],[38,22,33,22],[38,24,33,24],[39,8,34,12],[40,8,35,12],[40,15,35,19],[40,16,35,20],[41,6,36,8],[41,7,36,9],[41,13,37,13],[41,17,37,17,"u8aa"],[41,21,37,21],[41,22,37,22,"i"],[41,23,37,23],[41,24,37,24],[41,29,37,29,"u8ab"],[41,33,37,33],[41,34,37,34,"i"],[41,35,37,35],[41,36,37,36],[41,38,37,38],[42,8,38,12],[43,8,39,12],[44,8,40,12],[44,15,40,19,"u8aa"],[44,19,40,23],[44,20,40,24,"i"],[44,21,40,25],[44,22,40,26],[44,25,40,29,"u8ab"],[44,29,40,33],[44,30,40,34,"i"],[44,31,40,35],[44,32,40,36],[44,35,41,18],[44,36,41,19],[44,39,42,18],[44,40,42,19],[44,41,42,20],[45,6,43,8],[46,6,44,8,"i"],[46,7,44,9],[46,9,44,11],[47,4,45,4],[48,2,46,0],[49,0,46,1],[49,3]],"functionMap":{"names":["<global>","u8aCmp"],"mappings":"AAA;OCiB;CD4B"},"hasCjsExports":false},"type":"js/module"}]} |