function validateArrayLength(length) {
    if (length > MAX_JS_ARRAY_LENGTH) {
        throw JSBindingError(E_ARRAY_LENGTH, length);
    }
    return length;
}
Validate an array length. JS will throw its own error if you try
to create an array larger than 2^32 - 1, but validating beforehand
allows us to exit early before we try to process large amounts
of data that won't even fit in an output array
@private
@param  {number} length  Length to validate
@return {number}         Valid array length
@throws {H3Error}        If invalid