• Type Parameters

    • T extends object

    Parameters

    • obj: T

      The object to pick data from

    • paths: (keyof T)[]

      An array of paths to pick off obj

    Returns Partial<T>

    Key value pairs found in obj from paths

    Description

    Creates an object composed of the picked object properties.

    Example

    pick({ 'a': 1, 'b': '2', 'c': 3 }, ['a'. 'c'])
    // returns { 'a': 1, 'c': 3 }

Generated using TypeDoc