Function isPlainObject

Checks if given value is a plain object. Plain object should be an object that's not an instance of anything.

isPlainObject({}); // returns true
isPlainObject(Object.create(null)); // returns true
isPlainObject(new URL("https://ezez.dev")); // returns false
isPlainObject([]); // returns false
isPlainObject(5); // returns false
  • Parameters

    • value: unknown

      value to test

    Returns boolean