in lib/h3core.js [1085:1094]
export function gridRing(h3Index, ringSize) {
const maxCount = ringSize === 0 ? 1 : 6 * ringSize;
const hexagons = C._calloc(maxCount, SZ_H3INDEX);
try {
throwIfError(H3.gridRing(...h3IndexToSplitLong(h3Index), ringSize, hexagons));
return readArrayOfH3Indexes(hexagons, maxCount);
} finally {
C._free(hexagons);
}
}