si-funciona
    Preparing search index...

    Function reduceObject

    • This function is intended to replicate behaviour of the Array.reduce() function but for Objects. If an array is passed in instead then it will perform standard reduce(). It is recommended to always use the standard reduce() function when it is known that the object is actually an array.

      Parameters

      • obj: reduceableItem

        The Object (or Array) to be filtered

      • fn: reduceCallback

        The function to be processed for each filtered property

      • initialValue: reduceableItem = ...

        Optional. Value to use as the first argument to the first call of the callback. If no initial value is supplied, the first element in the array will be used. Calling reduce on an empty array without an initial value is an error.

      Returns any