What is is-obj?
The is-obj package is a simple utility that allows you to check if a value is a non-null object. It is useful when you want to ensure that a value is an object type (excluding null, arrays, and other non-plain objects) before performing operations that are specific to objects.
Check if a value is a non-null object
This feature allows you to verify if a given value is a non-null object. It returns true for plain objects and false for null, arrays, functions, and other non-object types.
const isObj = require('is-obj');
console.log(isObj({})); // true
console.log(isObj(null)); // false
console.log(isObj([])); // false
console.log(isObj('hello')); // false