isinstance
constisinstance: (obj:unknown,classInfo:unknown) =>boolean=builtins.isinstance
Defined in: packages/pythonlib/src/index.ts:187
Return True if the object is an instance of the specified class.
Supports JavaScript constructors (Number, String, etc.) and Python type names.
Parameters
| Parameter | Type | Description |
|---|---|---|
obj | unknown | The object to check |
classInfo | unknown | The class or type name to check against |
Returns
boolean
True if obj is an instance of classInfo