predictype

predictype v0.8.1


predictype / predicates/objects / objectInstanceRelation

Function: objectInstanceRelation()

objectInstanceRelation(source, oper, target): boolean

Defined in: predicates/objects/objectInstanceRelation.ts:18

Checks instance or prototype relation between two values using the specified operation.

Parameters

source

any

The value to check.

oper

ObjectInstanceRelationOper

The relation operation to perform (e.g. ‘instance_of’, ‘prototype_of’).

target

any

The target to compare against.

Returns

boolean

True if the relation check is valid according to the operator, otherwise false.

Throws

If the operation is not recognized.

Remarks

Supported Operators: