---
title: "isPlainObject"
description: "Check whether a value is a plain object created by an object literal or Object, excluding arrays, dates, functions, and class instances."
canonical_url: "https://core.mhaibaraai.cn/en/docs/validators/is-plain-object"
---
# isPlainObject

> Check whether a value is a plain object created by an object literal or Object, excluding arrays, dates, functions, and class instances.

## Usage

Check whether a value is a "plain" object (created by `{}` or `new Object()`), excluding arrays, `null`, and other non-plain-object types such as `new Date()`. This is a TypeScript type guard function.

```ts
import { isPlainObject } from '@movk/core'

isPlainObject({}) // => true
isPlainObject(new Object()) // => true
isPlainObject(new Date()) // => false
isPlainObject([]) // => false
```

## API

`isPlainObject(value: unknown): value is Record<string, any>`

### Parameters

**value** (`unknown`) *required*: The value to check.

### Returns

**boolean**: Returns true if the value is a plain object, otherwise false.

## Changelog

See commit history for [src/validators/isPlainObject.ts](https://github.com/mhaibaraai/movk-core/commits/main/src/validators/isPlainObject.ts).

---

- [GitHub](https://github.com/mhaibaraai/movk-core/blob/main/src/validators/isPlainObject.ts)


## Sitemap

See the full [sitemap](https://core.mhaibaraai.cn/sitemap.md) for all pages.
