domoritz commented on a change in pull request #10151:
URL: https://github.com/apache/arrow/pull/10151#discussion_r621796532



##########
File path: js/src/util/args.ts
##########
@@ -21,11 +21,26 @@ import { Column } from '../column';
 import { Vector } from '../vector';
 import { DataType } from '../type';
 import { Chunked } from '../vector/chunked';
+import { BigIntArray, TypedArray } from '../interfaces';
+import { FloatVector, IntVector } from '../vector/index';
 
 type RecordBatchCtor = typeof import('../recordbatch').RecordBatch;
 
 const isArray = Array.isArray;
 
+/** @ignore */
+export function isTypedArray(arr: any): arr is TypedArray | BigIntArray {
+    return ArrayBuffer.isView(arr) && 'BYTES_PER_ELEMENT' in arr;

Review comment:
       Arquero just uses `instanceof TypedArray`. 
   
   
https://github.com/uwdata/arquero/blob/af843a4377254bab970d40559879f9191fe81079/src/util/is-typed-array.js#L4




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to