@hexafuchs/what.js
    Preparing search index...

    Variable hasKeyConst Alias

    hasKey: <T>(
        container: Record<string, unknown> | Map<T, unknown>,
        key: T,
    ) => boolean = containsKey

    Type declaration

      • <T>(container: Record<string, unknown> | Map<T, unknown>, key: T): boolean
      • Returns whether the object contains the given key.

        Supports maps.

        Converts key to string before checking if it is a member of the object.

        Type Parameters

        • T

        Parameters

        • container: Record<string, unknown> | Map<T, unknown>
        • key: T

        Returns boolean