Options
All
  • Public
  • Public/Protected
  • All
Menu

Module at

Index

References

Functions Object

References

Renames and re-exports at

Object Functions

  • at(object: any, paths: number[]): any[]
  • at(object: any, paths: string[]): any[]
  • at(object: any, ...paths: number[]): any[]
  • at(object: any, ...paths: string[]): any[]
  • at(object: any, ...paths: any[]): any[]
  • Creates an array of values corresponding to paths of object.

    since

    5.5.0

    example
    const object = { 'a': [{ 'b': { 'c': 3 } }, 4] }

    at(object, ['a[0].b.c', 'a[1]'])
    // => [3, 4]

    Parameters

    • object: any

      The object to iterate over.

    • paths: number[]

      The property paths to pick.

    Returns any[]

    Returns the picked values.

  • Parameters

    • object: any
    • paths: string[]

    Returns any[]

  • Parameters

    • object: any
    • Rest ...paths: number[]

    Returns any[]

  • Parameters

    • object: any
    • Rest ...paths: string[]

    Returns any[]

  • Parameters

    • object: any
    • Rest ...paths: any[]

    Returns any[]