# type-is-plain-object

> A utility to test if a 'value' has a type of 'Object' and it was created by the Object constructor

Latest version **1.0.2** (published 2019-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install type-is-plain-object
pnpm add type-is-plain-object
yarn add type-is-plain-object
bun add type-is-plain-object
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-08-11 |
| First published | 2019-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | iClusterDev |
| Maintainers | iclusterdev |
| Keywords | utils, type, object, plainObject, isPlainObject, plain-object, is-plain-object |

## Links

- npm: https://www.npmjs.com/package/type-is-plain-object
- Repository: https://github.com/iClusterDev/type-is-plain-object
- Homepage: https://iclusterdev.github.io/type-is-plain-object/
- Issues: https://github.com/iClusterDev/type-is-plain-object/issues
- npm.io page: https://npm.io/package/type-is-plain-object

## Dependencies (1)

- [type-is-object](https://npm.io/package/type-is-object.md) ^1.0.9

## 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

- 1.0.2 (latest) — 2019-08-11
- 1.0.1 — 2019-08-11
- 1.0.0 — 2019-08-11

## README

# type-is-plain-object

A utility to test if a 'value' has a type of 'Object' and it was created by the Object constructor.

## Installation

Using [npm](https://www.npmjs.com/package/type-is-plain-object)

```console
npm i type-is-plain-object
```

## Usage

In Node (CommonJS)

```js
const isPlainObject = require('type-is-plain-object');

// on "undefined" -> false
console.log(isPlainObject());

// on "null" -> false
console.log(isPlainObject(null));

// on "number" -> false
console.log(isPlainObject(100));

// on "string" -> false
console.log(isPlainObject('foo'));

// on "boolean" -> false
console.log(isPlainObject(true));

// on "plain object" -> true
console.log(isPlainObject({ a: 100, b: 200 }));

// on "array" -> false
console.log(isPlainObject([1, 2, 3]));

// on "function" -> false
console.log(
  isPlainObject(function() {
    return 'bar';
  })
);
```

In the Browser (ES6 modules):

```js
import isPlainObject from 'type-is-plain-object';
```

## Contributing

If you find any issues, feel free to submit a pull request

## Author

[iClusterDev](https://github.com/iClusterDev)

## License

This project is under the [MIT](LICENSE) License

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