@s-libs/micro-dash
    Preparing search index...

    Function pick

    • Creates an object composed of the picked object properties.

      Differences from lodash:

      • paths must be direct properties of object (they cannot references deep properties)

      Contribution to minified bundle size, when it is the only function imported:

      • Lodash: 9,083 bytes
      • Micro-dash: 127 bytes

      Type Parameters

      • T
      • P extends readonly (keyof NonNullable<T>)[]

      Parameters

      • object: T
      • ...paths: P

      Returns IfCouldBe<T, Nil, {}> | { [K in string | number | symbol]: NonNullable<T>[K] }