• Creates a function that returns the value at path of a given object.

    Differences from lodash:

    • does not handle a dot-separated string for path

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

    • Lodash: 6,158 bytes
    • Micro-dash: 207 bytes

    Type Parameters

    • K extends PropertyKey

    Parameters

    • key: K

    Returns (<T>(object) => PropertyAtPath<T, [K]>)

      • <T>(object): PropertyAtPath<T, [K]>
      • Type Parameters

        • T

        Parameters

        • object: T

        Returns PropertyAtPath<T, [K]>

  • Type Parameters

    • P extends PropertyKey[]

    Parameters

    • path: readonly [P]

    Returns (<T>(object) => PropertyAtPath<T, P>)

      • <T>(object): PropertyAtPath<T, P>
      • Type Parameters

        • T

        Parameters

        • object: T

        Returns PropertyAtPath<T, P>