Fix TypedArray check, add check when instanceof doesn't work for TypedArrays.
This commit is contained in:
parent
2757046e71
commit
fac330fb50
3 changed files with 4 additions and 3 deletions
|
@ -11,6 +11,7 @@ module.exports = function isTypedArray (val) {
|
|||
val instanceof Uint16Array ||
|
||||
val instanceof Uint32Array ||
|
||||
val instanceof Float32Array ||
|
||||
val instanceof Float64Array)
|
||||
val instanceof Float64Array) ||
|
||||
(Object.prototype.toString.call(val).substr(-6, 5) === 'Array')
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue