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

    Function property

    • 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: T,
      ) => K extends keyof NonNullable<T>
          ? IfCouldBe<T, Nil, undefined, never> | NonNullable<T>[K<K>]
          : undefined

    • 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

      • P extends PropertyKey[]

      Parameters

      • path: readonly [P]

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