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.
Rest
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 Copy
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
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.