Returns true if object is a TypedArray (official Underscore docs). Views like Int8Array and Uint8Array pass; regular arrays, ArrayBuffer, and DataView do not. Stable helper (Underscore 1.11+) — not deprecated.
Pass the required arguments shown below. Underscore object helpers usually return a new value — check whether the source object is mutated.
Syntax
Call _.isTypedArray. Start with this line.
Underscore
_.isTypedArray(object)
Call
What it does
_.isTypedArray(object)
Primary signature.
_.isTypedArray(...)
Call with the arguments your case needs.
Load Underscore with import _ from "underscore" (or the UMD CDN build) so these helpers are available as _.
Library declarations
Underscore
_.isTypedArray(object)
Parameters
Parameter
Description
object
Required. Value to test
Return Value
Return Value
Description
*
true or false
Underscore.js Examples
Example 1 — Official: new Int8Array(8)
The docs check a real TypedArray with eight signed bytes.
Guard first. Skip non-TypedArrays so you never treat a buffer like an indexable view.
TypedArray path. Sum 1 + 2 + 3 from the Uint8Array → 6.
Fail closed. Normal arrays and buffers return 0.
Pattern. Type-check → then read indexed elements.
Compatibility
Browser & Runtime Support
_.isTypedArray ships with Underscore.js 1.11+. It needs a runtime that provides TypedArrays (modern browsers and current Node). Works via CDN or bundle with npm install underscore.
✓ Stable · Underscore 1.11+
_.isTypedArray()
Available in [email protected]+ (UMD / ESM). Requires TypedArray support (widely available since ES2015-era engines). Fine on evergreen browsers and current Node LTS when Underscore is loaded.
98%Modern TypedArray runtimes
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.isTypedArrayUnderscore 1.11+
Bottom line: Safe for modern apps once Underscore 1.11+ is loaded. Not a native browser API by itself — load Underscore first. Prefer a pinned CDN version (e.g. [email protected]).
Frequently Asked Questions
_.isTypedArray(object) returns true only when the value is a TypedArray — for example new Int8Array(8) or new Uint8Array(4). Regular arrays, ArrayBuffers, DataView, strings, and plain objects return false.
_.isTypedArray(new Int8Array(8)) returns true. The docs pick a real TypedArray on purpose — that is the type the helper looks for.
No. [] is a JavaScript Array of values. A TypedArray is a fixed-type binary view such as Int8Array or Float32Array. Use _.isArray for normal arrays.
No. ArrayBuffer is the raw byte storage. DataView is a different kind of view. Use _.isArrayBuffer or _.isDataView for those types.
typeof new Int8Array(8) is "object", so typeof is too broad. Underscore uses ArrayBuffer.isView when available (excluding DataView) or an internal TypedArray tag check.
No. It is a stable Underscore helper added in version 1.11.0 with _.isArrayBuffer and _.isDataView. Load Underscore 1.11+ and call _.isTypedArray(value).