Using the Node Package Manager (NPM)

npm i type-is-plain-object

...Or referencing the the .js or .min.js file through a script tag. This requires a custom build

<script src="your/path/isPlainObject.min.js"></script> 


In Node (CommonJS):

const isPlainObject = require('type-is-plain-object');

... Or in the Browser (ES6 modules):

import isPlainObject from 'type-is-plain-object';


console.log(isPlainObject({ a: 100 }));  // --> true
console.log(isPlainObject());            // --> false
console.log(isPlainObject(null));        // --> false
console.log(isPlainObject(100));         // --> false
console.log(isPlainObject('foo'));       // --> false
console.log(isPlainObject(true));        // --> false
console.log(isPlainObject([1, 2, 3]));   // --> false
console.log(isPlainObject(() => {...})); // --> false

Custom Build

The Custom Build process will produce the .js and the .min.js files in the auto-generated dist folder.

The following steps will guide through the process:

  1. Download the repo and extract the files
  2. Run npm install
  3. Run npm build to generate the dist folder
  4. Copy the .js or .min.js into your project directory
  5. Reference the files with a <script> tag
  6. You are good to go!


If you find any issues, feel free to submit a pull request


type-is-plain-object is maintained by iClusterDev.


This project is under the MIT License.