checks if an object obj is a TypedArray, based on simply checking whether obj.buffer exists or not.
this is certainly not a very robust way of verifying.
a better approach would be to check if obj instanceof Object.getPrototypeOf(Uint8Array), but this is quicker.
checks if an object
objis a TypedArray, based on simply checking whetherobj.bufferexists or not.this is certainly not a very robust way of verifying. a better approach would be to check if
obj instanceof Object.getPrototypeOf(Uint8Array), but this is quicker.