1.0.0 • Published 4 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); // true
1.0.0
4 years ago