Library API
    Preparing search index...

    Function pick

    • Creates a new object composed of the picked object properties.

      Type Parameters

      Parameters

      • obj: T

        The source object

      • ...keys: K[]

        The property names to pick

      Returns Partial<T>

      A new object containing only the picked properties

      const subset = pick({ a: 1, b: 2, c: 3 }, 'a', 'c'); // { a: 1, c: 3 }