UNPKG

is-typed-array

Version:

Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.

9 lines (6 loc) 180 B
'use strict'; var whichTypedArray = require('which-typed-array'); /** @type {import('.')} */ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); };