Function toPlainObjectOf

Creates an object from x with keys k if f(x[k]) returns true. If x is not a plain object, or there's no passed props, returns undefined.

  • Type Parameters

    • T

    Parameters

    • x: unknown
    • f: (v: unknown) => v is T

    Returns undefined | { [key: string | number | symbol]: T }