Skip to main content
variable transform
import { transform } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Applies a function against an accumulator and each key in the object (from left to right).

Use Object.keys(obj) to iterate over each key in the object, Array.prototype.reduce() to call the apply the specified function against the given accumulator.

type

(
obj: AnyObject,
fn: Function,
acc?: { },
) => unknown