filterUndefined

Filters out properties with undefined or null values from the provided object.

Import

1import { filterUndefined } from "@aa-sdk/core";

Usage

1import { filterUndefined } from "@aa-sdk/core";
2
3const result = filterUndefined({
4 foo: undefined,
5 bar: null,
6 baz: "baz",
7}); // { baz: "baz" }

Parameters

obj

T the object from which to remove properties with undefined or null values

Returns

T the object with undefined or null properties removed