predictype

predictype v0.8.1


predictype / predicates/objects / objectKeysCompare

Function: objectKeysCompare()

objectKeysCompare(source, oper, keys): boolean

Defined in: predicates/objects/objectKeys.ts:24

Checks object keys for key-comparison operations (CONTAINS_, LACKS_, EQUALS_, etc.).

Parameters

source

object

The object to check.

oper

ObjectKeysOper

The key operation to perform (e.g. ‘contains_all_keys’, ‘lacks_all_keys’, ‘equals_keys’, …).

keys

The array of keys to check (string[] symbol[]).
string[] symbol[]

Returns

boolean

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

Throws

If the operation is not recognized or keys is missing.

Remarks

Supported Operators: