vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Function iterateObject

    • Iterates over the properties of an object and invokes a callback function for each key-value pair. Optionally, the iteration can be performed recursively for nested objects.

      Type Parameters

      • T extends object

        The type of the object being iterated.

      Parameters

      • obj: T

        The object to iterate over.

      • callback: (key: string, value: any, obj: T) => void

        A function to be called for each key-value pair. Receives the key, value, and the original object as arguments.

      • Optionaloptions: { recursive?: boolean }

        Optional settings for the iteration.

        • Optionalrecursive?: boolean

          If true, the function will recursively iterate over nested objects. Defaults to false.

      Returns void