1.0.0 • Published 6 years ago
is-true-object v1.0.0
Returns true if target is a real non-null object, including objects with the [[IsHTMLDDA]] internal slot, such as HTMLAllCollection, which makes typeof return undefined.
import isObject from "is-real-object";
isObject(undefined); // false
isObject(null); // false
isObject("string"); // false
isObject(123); // false
isObject(123n); // false
isObject(true); // false
isObject(false); // false
isObject(Symbol.iterator); // false
isObject({}); // true
isObject(() => {}); // true
// in browsers:
isObject(document.all); // true1.0.0
6 years ago