Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "object/traverse"

Index

Functions

Functions

traverse

  • traverse(obj: unknown, ...keys: string[]): unknown
  • Traverses down a tree like object via list of keys.

    throws

    Throws an error when a given key is not found in the object traversing.

    Parameters

    • obj: unknown

      The tree like object with nested properties to traverse.

    • Rest ...keys: string[]

      The list of keys to traverse, in order.

    Returns unknown

    Whatever value is at the end of the keys path.

Generated using TypeDoc