// package
is-plain-object
type: "module"
// preferences
// replacements (1)
snippet::is-object
Simple or drop-in replacementThis package is no longer necessary. You can use `typeof` to check if a value is an object and `Object.getPrototypeOf` to ensure it's a plain object.
// example
const isObject = (obj) =>
obj &&
typeof obj === 'object' &&
(Object.getPrototypeOf(obj) === null ||
Object.getPrototypeOf(obj) ===
Object.prototype);