Lodash _.isObject() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Lang

Definition

Checks if value is the language type of Object (arrays, functions, objects, regexes, new Number(0), new String('')). Part of Lodash Lang (stable — not deprecated). Note: null returns false despite typeof null === "object".

Pass the value you want to inspect or convert. Read the return type carefully before you use the result.

Syntax

Call _.isObject. Start with this line.

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

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

Library declarations
Lodash
_.isObject(value)

Parameters

ParameterDescription
valueRequired. Value to check

Return Value

Return ValueDescription
*true if Object language type, else false

Lodash Examples

Example 1 — Official: Objects, Arrays, Functions, null

Broad Object language type — including callables.

Lodash
console.log(_.isObject({}));        // true
console.log(_.isObject([1, 2, 3])); // true
console.log(_.isObject(_.noop));    // true
console.log(_.isObject(null));      // false
Try It Yourself

How It Works

  1. Plain object. {} is typeof object → true.
  2. Array. Arrays are objects in JavaScript → true.
  3. Function. _.noop is typeof function → still true.
  4. null. Rejected even though typeof says "object".

Example 2 — null Is Not an Object

Lodash fixes the classic typeof null quirk.

Lodash
console.log(typeof null);       // "object"  // language quirk
console.log(_.isObject(null));  // false
console.log(_.isObject({}));    // true
Try It Yourself

How It Works

  1. typeof quirk. Native typeof null reports "object".
  2. Lodash guard. value != null filters null out first.
  3. Real object. {} passes the check.
  4. Use. Safer than raw typeof value === "object".

Example 3 — isObject vs isObjectLike

Functions pass isObject but fail isObjectLike.

Lodash
console.log(_.isObject(_.noop));     // true
console.log(_.isObjectLike(_.noop)); // false

console.log(_.isObject({}));         // true
console.log(_.isObjectLike({}));     // true
Try It Yourself

How It Works

  1. Function. isObject allows typeof function → true.
  2. isObjectLike. Only typeof object → function fails.
  3. Plain object. Both helpers agree → true.
  4. Pick. Need callables included? Prefer isObject.

Example 4 — isObject vs isPlainObject

Arrays and class instances are objects, but not plain objects.

Lodash
console.log(_.isObject([1, 2]));      // true
console.log(_.isPlainObject([1, 2])); // false

console.log(_.isObject({ a: 1 }));      // true
console.log(_.isPlainObject({ a: 1 })); // true
Try It Yourself

How It Works

  1. Array. Language Object type → isObject is true.
  2. Plain check. Arrays are not plain dictionaries → false.
  3. Literal {}. Both helpers accept a simple object.
  4. Use. Config/options bags → isPlainObject; broad gate → isObject.

Example 5 — Boxed Primitives Count

Official docs include new Number(0) and new String('').

Lodash
console.log(_.isObject(new Number(0)));  // true
console.log(_.isObject(new String(""))); // true
console.log(_.isObject(0));              // false
console.log(_.isObject(""));             // false
Try It Yourself

How It Works

  1. Boxed. Wrappers are real objects → true.
  2. Primitives. Bare 0 / "" are not Object types → false.
  3. Docs. Matches the official language-type definition.
  4. Tip. Prefer primitives in modern code; still handle wrappers if needed.

Browser & Runtime Support

_.isObject is a Lodash Lang helper available in 4.x (and earlier builds). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Native engines have typeof, but Lodash’s helper also treats functions as Object language types and rejects null.

✓ Stable · Lodash 4.x

_.isObject()

Available in [email protected] full builds and the lodash/isObject modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.

100% With Lodash 4.x
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
_.isObject Lodash 4.x

Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import isObject from "lodash/isObject" for smaller builds. Safer than typeof value === "object" alone.

Frequently Asked Questions

_.isObject(value) checks whether value is the language type of Object — including arrays, functions, plain objects, regexes, and boxed primitives like new Number(0). null returns false.
Yes. Arrays have typeof "object" and are not nullish, so _.isObject([1, 2, 3]) is true.
Yes for Lodash. Functions satisfy typeof "function", which _.isObject deliberately allows — unlike _.isObjectLike.
isObject is broad (arrays, functions, dates, regexes). isPlainObject narrows to simple dictionaries from Object or null prototypes — classes and builtins fail.
typeof null is the legacy "object" quirk, but Lodash rejects null and undefined up front with value != null.
Use import isObject from "lodash/isObject" or require("lodash/isObject") so bundlers can tree-shake unused Lodash code. Full build: import _ from "lodash" then _.isObject.

Next: _.isObjectLike()

Check for non-null values with typeof object (no functions).

_.isObjectLike() tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

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