UNPKG

predictype

Version:

PredicType is a library of pre-built and tested predicates for TypeScript, covering various data types and operations.

19 lines (18 loc) 802 B
import { ObjectKeysStateOper } from '../../enums/objects.js'; /** * Checks state-related properties of an object's keys (e.g. has_symbol_keys, has_numeric_keys). * * @param obj The object to check. * @param oper The state operation to perform (ObjectKeysStateOper). * @returns True if the state check is valid according to the operator, otherwise false. * * @throws {Error} If the operation is not recognized. * * @remarks * Supported Operators: * - **HAS_SYMBOL_KEYS**: Object has at least one symbol key * - **HAS_NUMERIC_KEYS**: Object has at least one numeric key * - **HAS_CAMELCASE_KEYS**: Object has at least one camelCase key * - **HAS_HOMOGENEOUS_KEYS**: All keys are of the same type */ export declare function objectKeysState(obj: object, oper: ObjectKeysStateOper): boolean;