filterUndefined

1function filterUndefined<T>(obj): T;

Defined in: aa-sdk/core/src/utils/index.ts:99

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

Example

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

Type Parameters

Type Parameter

T

Parameters

ParameterTypeDescription

obj

T

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

Returns

T

the object with undefined or null properties removed