Lodash _.isTypedArray() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Lang

Definition

Checks if value is classified as a TypedArray (a typed view over an ArrayBuffer). Part of Lodash Lang since 3.0.0 (stable — not deprecated).

Note: Plain arrays, ArrayBuffer, and DataView are not TypedArrays — use the matching helpers for those.

Syntax

Call _.isTypedArray. Start with this line.

Lodash
_.isTypedArray(value)
CallWhat it does
_.isTypedArray(value)Primary signature.

Prefer import isTypedArray from "lodash/isTypedArray" when you want a smaller bundle.

Library declarations
Lodash
_.isTypedArray(value)

Parameters

ParameterDescription
valueRequired. The value to check

Return Value

Return ValueDescription
*true if TypedArray, else false

Lodash Examples

Example 1 — Official: new Uint8Array

A TypedArray view is classified as a TypedArray.

Lodash
_.isTypedArray(new Uint8Array);
// → true
Try It Yourself

How It Works

  1. Construct. new Uint8Array creates a typed view.
  2. Brand. Lodash recognizes the TypedArray tag.
  3. Result. Returns true.
  4. Empty OK. Length does not matter for the type check.

Example 2 — Official: Plain Array []

Ordinary arrays are not TypedArrays.

Lodash
_.isTypedArray([]);
// → false
Try It Yourself

How It Works

  1. Input. Official sample: a plain empty array.
  2. Wrong brand. Arrays use a different internal type.
  3. Result. Returns false.
  4. Related. Use _.isArray for arrays.

Example 3 — Other Typed Views

Float and integer views all pass the same helper.

Lodash
_.isTypedArray(new Float64Array(1));
// → true

_.isTypedArray(new Int32Array([1, 2, 3]));
// → true
Try It Yourself

How It Works

  1. Float64. Floating-point view → still a TypedArray.
  2. Int32. Integer view with values → still passes.
  3. One helper. You do not need a check per constructor.
  4. Use. Guard binary / numeric buffers before processing.

Example 4 — ArrayBuffer & DataView

The raw buffer and DataView are related — but not TypedArrays.

Lodash
var buf = new ArrayBuffer(8);

_.isTypedArray(buf);
// → false

_.isTypedArray(new DataView(buf));
// → false
Try It Yourself

How It Works

  1. ArrayBuffer. Raw bytes — use _.isArrayBuffer.
  2. DataView. Flexible accessor, not a typed numeric view.
  3. Both fail. _.isTypedArray wants TypedArray brands only.
  4. Tip. Create a view with new Uint8Array(buf) when you need one.

Example 5 — isTypedArray vs Array.isArray

TypedArrays are indexable, but they are not arrays.

Lodash
var view = new Uint8Array([1, 2, 3]);

_.isTypedArray(view);   // → true
Array.isArray(view);    // → false
_.isArray(view);        // → false
Try It Yourself

How It Works

  1. Typed. Lodash reports a TypedArray → true.
  2. Array.isArray. Looks for Array brand → false.
  3. _.isArray. Same idea — also false.
  4. Pick. Use the helper that matches the real type you need.

Browser & Runtime Support

_.isTypedArray is a Lodash Lang helper since 3.0.0. It runs anywhere Lodash runs on an engine with TypedArrays — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash.

✓ Stable · Lodash 3.0.0+

_.isTypedArray()

Available in [email protected] full builds and the lodash/isTypedArray modular import. Requires a runtime that provides TypedArray constructors (all modern engines).

100% With Lodash 3+
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
_.isTypedArray Lodash 3.0.0+

Bottom line: Safe for production once Lodash is loaded on a TypedArray-capable runtime. Prefer import isTypedArray from "lodash/isTypedArray" for smaller bundles. Use it before TypedArray-only binary processing.

Frequently Asked Questions

_.isTypedArray(value) returns true if value is a TypedArray view (for example Uint8Array or Float64Array). Plain arrays, ArrayBuffer, DataView, and null return false.
Views such as Int8Array, Uint8Array, Uint8ClampedArray, Int16/32Array, Uint16/32Array, Float32/64Array, and (in modern engines) BigInt64Array / BigUint64Array.
ArrayBuffer is the raw byte store. TypedArrays are typed views over it. Use _.isArrayBuffer for the buffer itself.
No. DataView is a flexible byte accessor over an ArrayBuffer, but it is not classified as a TypedArray.
No. Array.isArray returns false for TypedArrays even though they are indexable — they use a different internal brand.
Use import isTypedArray from "lodash/isTypedArray" or require("lodash/isTypedArray"). Full build: import _ from "lodash" then _.isTypedArray.

Next: _.isUndefined()

Check whether a value is strictly undefined.

_.isUndefined() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful