function localIjToCell(origin, coords) {
    // Validate input coords
    if (!coords || typeof coords.i !== 'number' || typeof coords.j !== 'number') {
        throw new Error('Coordinates must be provided as an {i, j} object');
    }
    // Allocate memory for the CoordIJ struct and an H3 index to hold the return value
    const ij = C._malloc(SZ_COORDIJ);
    const out = C._malloc(SZ_H3INDEX);
    storeCoordIJ(ij, coords);
    try {
        throwIfError(
            H3.localIjToCell(...h3IndexToSplitLong(origin), ij, LOCAL_IJ_DEFAULT_MODE, out)
        );
        return validateH3Index(readH3IndexFromPointer(out));
    } finally {
        C._free(ij);
        C._free(out);
    }
}
Produces an H3 index for IJ coordinates anchored by an origin.

- The coordinate space used by this function may have deleted
regions or warping due to pentagonal distortion.
- Coordinates are only comparable if they come from the same
origin index.
- Failure may occur if the index is too far away from the origin
or if the index is on the other side of a pentagon.
- This function is experimental, and its output is not guaranteed
to be compatible across different versions of H3.
@static
@param  {H3IndexInput} origin     Origin H3 index
@param  {CoordIJ} coords     Coordinates as an `{i, j}` pair
@return {H3Index}            H3 index at the relative coordinates
@throws {H3Error}            If the H3 index cannot be calculated