vis-util
    Preparing search index...

    Function forEach

    For each method for both arrays and objects. In case of an array, the built-in Array.forEach() is applied (No, it's not!). In case of an Object, the method loops over all properties of the object.

    An Object or Array to be iterated over.

    Array.forEach-like callback.

    • Type Parameters

      • V

      Parameters

      • array: undefined | null | V[]
      • callback: (value: V, index: number, object: V[]) => void

      Returns void

    • Type Parameters

      • O extends object

      Parameters

      • object: undefined | null | O
      • callback: <Key extends string | number | symbol>(
            value: O[Key],
            key: Key,
            object: O,
        ) => void

      Returns void