• 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

    Returns

    Curried function with property in context.

    Type Parameters

    • Property extends PropertyKey

    Parameters

    • property: Property

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

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

        • Actual extends object

        Parameters

        • object: Actual | Readonly<Record<Property, unknown>>

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