• Performs the specified action with all object keys.

    If the action returns an object type, Process will be called again with it.

    Extra arguments to be passed to the action (after the object and key) can be specified with extra optional arguments to Process.

    Type Parameters

    • T extends object
    • U = any

    Parameters

    Returns T

    Example

    import { process } from 'deleight/object/process'
    let count = 0;
    process({ a: 1, b: 2, c: 3 }, (obj, key) => count += (obj[key] * obj[key]));
    console.log(count) // 14