• 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
    • Rest ...paths: P

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

Generated using TypeDoc