Home > @jsplumbtoolkit/browser-ui > isAssignableFrom
isAssignableFrom() function
Returns true if the given object
can be considered to be an instance of the class cls
. This is done by testing the proto chain of the object and checking at each level to see if the proto is an instance of the given class.
Signature:
export declare function isAssignableFrom(object: any, cls: any): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
object | any | Object to test |
cls | any | Class to test for. |
Returns:
boolean