DocsCommonutilitiesIsClassInstance
Package: @hexos/common

Detects whether a value is an instance of a custom class (not a plain object).

Distinguishes between plain objects ({}) and class instances by checking if the constructor name differs from 'Object'. Handles null-prototype objects safely (created via Object.create(null)).

Uses isObject internally to first confirm the value is an object.

function isClassInstance(item: any): boolean

Parameters

item

any