Reduces the input object using the reducer (and optional initial value) and return the reduced value.
import { reduce } from 'deleight/object/operations'const r = reduce({ a: 1, b: 2, c: 3 }, (r, k, v) => r + (v * v), 0); console.log(r) // 14 Copy
import { reduce } from 'deleight/object/operations'const r = reduce({ a: 1, b: 2, c: 3 }, (r, k, v) => r + (v * v), 0); console.log(r) // 14
Reduces the input object using the reducer (and optional initial value) and return the reduced value.