@boost/commonFunctionsisObjectisObject CallableisObject<T>(value: unknown): value is TReturns true if the value is an object. import { isObject } from '@boost/common';isObject({}); // trueisObject(new Foo()); // trueisObject([]); // false Generics can be used to type the return value of the object (when necessary). interface Person { name: string;}if (isObject<Person>(person)) { console.log(person.name);}Type parametersT = object
Returns
true
if the value is an object.Generics can be used to type the return value of the object (when necessary).