Function isPrototypeOf

  • Checks if given input's prototype comes directly from given constructor.

    Example

    const isPrototypeOfObject = isPrototypeOf(Object);
    isPrototypeOfObject({}); // true
    isPrototypeOfObject(/./); // false

    Returns

    Returns a curried function with constructor in context.

    Type Parameters

    • Constructor extends GenericConstructor<ReadOnlyArray<never>, unknown>

    Parameters

    • constructor: Constructor

      Constructor to check.

    Returns (<Input>(object: Input) => boolean)

      • <Input>(object: Input): boolean
      • Type Parameters

        • Input extends object

        Parameters

        • object: Input

        Returns boolean