export function cellToParent()

in lib/h3core.js [813:822]


export function cellToParent(h3Index, res) {
    const [lower, upper] = h3IndexToSplitLong(h3Index);
    const parent = C._malloc(SZ_H3INDEX);
    try {
        throwIfError(H3.cellToParent(lower, upper, res, parent));
        return validateH3Index(readH3IndexFromPointer(parent));
    } finally {
        C._free(parent);
    }
}