function flatten

export function flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;

Flatten an object. Any properties that are collections will get converted to an array of keys.

Parameters

obj: unknown
The object to flatten.
...props: Record<string, boolean | string>[]
Specific properties to include/exclude.