function readH3IndexFromPointer()

in lib/h3core.js [398:404]


function readH3IndexFromPointer(cAddress, offset = 0) {
    const lower = C.getValue(cAddress + SZ_H3INDEX * offset, 'i32');
    const upper = C.getValue(cAddress + SZ_H3INDEX * offset + SZ_INT, 'i32');
    // The lower bits are allowed to be 0s, but if the upper bits are 0
    // this represents an invalid H3 index
    return upper ? splitLongToH3Index(lower, upper) : null;
}