UNPKG

@moderntribe/wme-utils

Version:

Common utilities used in the WME ecosystem

14 lines 408 B
type Validate<T> = Pick<T, { [Prop in keyof T]: T[Prop] extends null ? never : Prop; }[keyof T]>; /** * Removes empty items from object. * * @see https://stackoverflow.com/a/70363240 * * @param {Object} object * @return {Object} - Returns object with emtpy items removed. */ export declare function removeNulls<Obj>(object: Obj): Validate<Obj>; export {}; //# sourceMappingURL=removeNulls.d.ts.map