mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 22:41:02 +00:00
1 line
4.6 KiB
Plaintext
1 line
4.6 KiB
Plaintext
{"dependencies":[{"name":"./toU8a.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":19,"index":121},"end":{"line":4,"column":40,"index":142}}],"key":"Tcj3fJY+iCFcEHg4eIK/gqKeizo=","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 toU8a_js_1 = 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, toU8a_js_1.u8aToU8a)(a);\n var u8ab = (0, toU8a_js_1.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":[[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,"u8aCmp"],[7,16,3,14],[7,19,3,17,"u8aCmp"],[7,25,3,23],[8,2,4,0],[8,6,4,6,"toU8a_js_1"],[8,16,4,16],[8,19,4,19,"require"],[8,26,4,26],[8,27,4,26,"_dependencyMap"],[8,41,4,26],[8,58,4,39],[8,59,4,40],[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,0,20,0],[25,2,21,0],[25,11,21,9,"u8aCmp"],[25,17,21,15,"u8aCmp"],[25,18,21,16,"a"],[25,19,21,17],[25,21,21,19,"b"],[25,22,21,20],[25,24,21,22],[26,4,22,4],[26,8,22,10,"u8aa"],[26,12,22,14],[26,15,22,17],[26,16,22,18],[26,17,22,19],[26,19,22,21,"toU8a_js_1"],[26,29,22,31],[26,30,22,32,"u8aToU8a"],[26,38,22,40],[26,40,22,42,"a"],[26,41,22,43],[26,42,22,44],[27,4,23,4],[27,8,23,10,"u8ab"],[27,12,23,14],[27,15,23,17],[27,16,23,18],[27,17,23,19],[27,19,23,21,"toU8a_js_1"],[27,29,23,31],[27,30,23,32,"u8aToU8a"],[27,38,23,40],[27,40,23,42,"b"],[27,41,23,43],[27,42,23,44],[28,4,24,4],[28,8,24,8,"i"],[28,9,24,9],[28,12,24,12],[28,13,24,13],[29,4,25,4],[29,11,25,11],[29,15,25,15],[29,17,25,17],[30,6,26,8],[30,10,26,14,"overA"],[30,15,26,19],[30,18,26,22,"i"],[30,19,26,23],[30,23,26,27,"u8aa"],[30,27,26,31],[30,28,26,32,"length"],[30,34,26,38],[31,6,27,8],[31,10,27,14,"overB"],[31,15,27,19],[31,18,27,22,"i"],[31,19,27,23],[31,23,27,27,"u8ab"],[31,27,27,31],[31,28,27,32,"length"],[31,34,27,38],[32,6,28,8],[32,10,28,12,"overA"],[32,15,28,17],[32,19,28,21,"overB"],[32,24,28,26],[32,26,28,28],[33,8,29,12],[34,8,30,12],[34,15,30,19],[34,16,30,20],[35,6,31,8],[35,7,31,9],[35,13,32,13],[35,17,32,17,"overA"],[35,22,32,22],[35,24,32,24],[36,8,33,12],[37,8,34,12],[37,15,34,19],[37,16,34,20],[37,17,34,21],[38,6,35,8],[38,7,35,9],[38,13,36,13],[38,17,36,17,"overB"],[38,22,36,22],[38,24,36,24],[39,8,37,12],[40,8,38,12],[40,15,38,19],[40,16,38,20],[41,6,39,8],[41,7,39,9],[41,13,40,13],[41,17,40,17,"u8aa"],[41,21,40,21],[41,22,40,22,"i"],[41,23,40,23],[41,24,40,24],[41,29,40,29,"u8ab"],[41,33,40,33],[41,34,40,34,"i"],[41,35,40,35],[41,36,40,36],[41,38,40,38],[42,8,41,12],[43,8,42,12],[44,8,43,12],[44,15,43,19,"u8aa"],[44,19,43,23],[44,20,43,24,"i"],[44,21,43,25],[44,22,43,26],[44,25,43,29,"u8ab"],[44,29,43,33],[44,30,43,34,"i"],[44,31,43,35],[44,32,43,36],[44,35,44,18],[44,36,44,19],[44,39,45,18],[44,40,45,19],[44,41,45,20],[45,6,46,8],[46,6,47,8,"i"],[46,7,47,9],[46,9,47,11],[47,4,48,4],[48,2,49,0],[49,0,49,1],[49,3]],"functionMap":{"names":["<global>","u8aCmp"],"mappings":"AAA;ACoB;CD4B"},"hasCjsExports":true},"type":"js/module"}]} |