---
title: "Check General Object"
description: "Determine if a value is a general object in TypeScript."
date: "2025-10-02"
tags: ["typescript","object","check","frontend"]
canonical: "/snippets/typescript/object/is-object"
---

import { Code } from '@astrojs/starlight/components'
import Source from './is-object.ts?raw'

## Check if a value is an general object

Objects in javascript are 'object' type, but arrays, null, Dates, and other
non-primitive types are also 'object' type. This function checks if a value is a
general object.

<Code code={Source} lang="ts" title="is-object.ts" wrap />

Credits: [Angelos
Chalaris](https://www.30secondsofcode.org/js/s/complete-guide-to-js-type-checking/)
