UNPKG

emmet.sdk

Version:
33 lines 948 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.format2BigInt = void 0; const verifiers_1 = require("../verifiers"); const hexToDecimalString_1 = require("./hexToDecimalString"); function format2BigInt(a, b) { let _a, _b; if (a && typeof a === 'string') { if ((0, verifiers_1.isHexString)(a)) { _a = (0, hexToDecimalString_1.hexToDecimalString)(a); } else { _a = a.replace(/[^0-9]/g, ''); } } else { _a = a; } if (b && typeof b === 'string') { if ((0, verifiers_1.isHexString)(b)) { _b = (0, hexToDecimalString_1.hexToDecimalString)(b); } else { _b = b.replace(/[^0-9]/g, ''); } } else { _b = b; } return { _a: _a ? BigInt(_a) : 0n, _b: _b ? BigInt(_b) : 0n }; } exports.format2BigInt = format2BigInt; //# sourceMappingURL=format2BigInt.js.map