Function isPrototypeOf

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

    Example

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

    Type Parameters

    • Constructor extends Class

    Parameters

    • constructor: Constructor

      Constructor to check.

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

    Returns a curried function with constructor in context.

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

        • Input extends object

        Parameters

        • object: Input

        Returns boolean