Skip to main content

Home > @jsplumb/util > 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#

ParameterTypeDescription
objectanyObject to test
clsanyClass to test for.

Returns:

boolean