# @fvilers/is-object

> A TypeScript type guard that validates if the given value is an object

Latest version **2.0.0** (published 2022-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fvilers/is-object
pnpm add @fvilers/is-object
yarn add @fvilers/is-object
bun add @fvilers/is-object
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-07-05 |
| First published | 2021-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Fabian Vilers |
| Maintainers | fvilers |
| Keywords | typescript, typescript-library |

## Links

- npm: https://www.npmjs.com/package/@fvilers/is-object
- Repository: https://github.com/fvilers/is-object
- Homepage: https://github.com/fvilers/is-object#readme
- Issues: https://github.com/fvilers/is-object/issues
- npm.io page: https://npm.io/package/@fvilers/is-object

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-07-05
- 1.0.0 — 2021-09-14

## README

# @fvilers/is-object

A TypeScript type guard that validates if the given value is an object

## Installation

```
npm install @fvilers/is-object
```

or

```
yarn add @fvilers/is-object
```

# ECMAScript module

Starting with version 2.0.0, this library will be published as an ECMAScript module.

## Usage

```ts
import { isObject } from "@fvilers/is-object";

const variable: any = { hello: "world" };

if (isObject(variable)) {
  // From here, variable is strongly typed as an object
  console.log(
    "Variable is an object with key(s)",
    Reflect.ownKeys({ hello: "world" })
  );
} else {
  console.log("Variable is not an object");
}
```

It will output:

```
Variable is an object with key(s) [ 'hello' ]
```

---
_Source: https://npm.io/package/@fvilers/is-object · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
