• Curried wrapper for the in operator. Given a property name and an object, returns true the object contains that property, false otherwise.

    Example

    const hasCircle = has("🟢");

    hasCircle({ "🟢": "🟩" }); // true
    hasCircle({ "🟩": "🟢" }); // false

    Type Parameters

    • Property extends PropertyKey

    Parameters

    • property: Property

    Returns ((object) => object is Readonly<Record<Property, unknown>>)

    Curried function with property in context.

      • (object): object is Readonly<Record<Property, unknown>>
      • Parameters

        • object: unknown

        Returns object is Readonly<Record<Property, unknown>>