@alextheman/utility - v5.34.0
    Preparing search index...

    Function objectContainsKeys

    • Determines if the given object contains all of the keys provided.

      Type Parameters

      • Key extends PropertyKey = string

      Parameters

      • input: object

        The input object to check.

      • keys: Key | readonly Key[]

        The keys expected to be in the input object.

      Returns input is Record<Key, unknown>

      true if the input object contains all provided keys, and false otherwise. The input type will also be narrowed down to be a record with the provided keys with an unknown value type.