utils
    Preparing search index...

    Function mapObject

    • Iterates over the properties of an object and applies a handler function to each one, modifying the object in place with the return values.

      This function is similar to Array.prototype.map, but for objects. It allows you to transform the values of an object based on a custom function.

      Type Parameters

      • T extends object

        The type of the source object.

      Parameters

      • source: T

        The object to iterate and modify.

      • handle: MapObjectHandler<T>

        The function to call for each key-value pair. It receives the key, the old value, and the source object. The returned value will replace the old value.

      Returns T

      • T The modified source object.