mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 15:41:01 +00:00
1 line
2.9 KiB
Plaintext
1 line
2.9 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 exports.floatToU8a = floatToU8a;\n /**\n * @name floatToU8a\n * @description Converts a float into a U8a representation (While we don't use BE in SCALE\n * we still allow for either representation, although, as elsewhere, isLe is default)\n */\n function floatToU8a(value = 0.0, {\n bitLength = 32,\n isLe = true\n } = {}) {\n if (bitLength !== 32 && bitLength !== 64) {\n throw new Error('Invalid bitLength provided, expected 32 or 64');\n }\n const result = new Uint8Array(bitLength / 8);\n const dv = new DataView(result.buffer, result.byteOffset);\n if (bitLength === 32) {\n dv.setFloat32(0, Number(value), isLe);\n } else {\n dv.setFloat64(0, Number(value), isLe);\n }\n return result;\n }\n});","lineCount":29,"map":[[7,2,6,0,"exports"],[7,9,6,0],[7,10,6,0,"floatToU8a"],[7,20,6,0],[7,23,6,0,"floatToU8a"],[7,33,6,0],[8,2,1,0],[9,0,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,2,6,7],[13,11,6,16,"floatToU8a"],[13,21,6,26,"floatToU8a"],[13,22,6,27,"value"],[13,27,6,32],[13,30,6,35],[13,33,6,38],[13,35,6,40],[14,4,6,42,"bitLength"],[14,13,6,51],[14,16,6,54],[14,18,6,56],[15,4,6,58,"isLe"],[15,8,6,62],[15,11,6,65],[16,2,6,70],[16,3,6,71],[16,6,6,74],[16,7,6,75],[16,8,6,76],[16,10,6,78],[17,4,7,4],[17,8,7,8,"bitLength"],[17,17,7,17],[17,22,7,22],[17,24,7,24],[17,28,7,28,"bitLength"],[17,37,7,37],[17,42,7,42],[17,44,7,44],[17,46,7,46],[18,6,8,8],[18,12,8,14],[18,16,8,18,"Error"],[18,21,8,23],[18,22,8,24],[18,69,8,71],[18,70,8,72],[19,4,9,4],[20,4,10,4],[20,10,10,10,"result"],[20,16,10,16],[20,19,10,19],[20,23,10,23,"Uint8Array"],[20,33,10,33],[20,34,10,34,"bitLength"],[20,43,10,43],[20,46,10,46],[20,47,10,47],[20,48,10,48],[21,4,11,4],[21,10,11,10,"dv"],[21,12,11,12],[21,15,11,15],[21,19,11,19,"DataView"],[21,27,11,27],[21,28,11,28,"result"],[21,34,11,34],[21,35,11,35,"buffer"],[21,41,11,41],[21,43,11,43,"result"],[21,49,11,49],[21,50,11,50,"byteOffset"],[21,60,11,60],[21,61,11,61],[22,4,12,4],[22,8,12,8,"bitLength"],[22,17,12,17],[22,22,12,22],[22,24,12,24],[22,26,12,26],[23,6,13,8,"dv"],[23,8,13,10],[23,9,13,11,"setFloat32"],[23,19,13,21],[23,20,13,22],[23,21,13,23],[23,23,13,25,"Number"],[23,29,13,31],[23,30,13,32,"value"],[23,35,13,37],[23,36,13,38],[23,38,13,40,"isLe"],[23,42,13,44],[23,43,13,45],[24,4,14,4],[24,5,14,5],[24,11,15,9],[25,6,16,8,"dv"],[25,8,16,10],[25,9,16,11,"setFloat64"],[25,19,16,21],[25,20,16,22],[25,21,16,23],[25,23,16,25,"Number"],[25,29,16,31],[25,30,16,32,"value"],[25,35,16,37],[25,36,16,38],[25,38,16,40,"isLe"],[25,42,16,44],[25,43,16,45],[26,4,17,4],[27,4,18,4],[27,11,18,11,"result"],[27,17,18,17],[28,2,19,0],[29,0,19,1],[29,3]],"functionMap":{"names":["<global>","floatToU8a"],"mappings":"AAA;OCK;CDa"},"hasCjsExports":false},"type":"js/module"}]} |