• The opposite of pick; this function creates an object composed of the own enumerable string properties of object that are not omitted.

    Differences from lodash:

    • paths must be direct keys of object (they cannot refer to deeper properties)
    • does not work with arrays

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

    • Lodash: 18,060 bytes
    • Micro-dash: 161 bytes

    Type Parameters

    • T extends object | Nil

    • O extends readonly (keyof Exclude<T, Nil>)[]

    Parameters

    • object: T
    • Rest ...paths: O

    Returns IfCouldBe<T, Nil, EmptyObject> | {
        [K in RemainingKeys<Exclude<T, Nil>, O[number]>]: Exclude<T, Nil>[K]
    }

Generated using TypeDoc