UNPKG

@alexaegis/common

Version:

Common utility functions

10 lines 458 B
export type DropKeyMatcher = (value: unknown, key: string | number | symbol) => boolean; export declare const defaultDropKeyMatcher: DropKeyMatcher; /** * Drops all keys that resolve to true using a matcher. * By default it drops keys set as undefined * * Mutates the object! Use `structuredClone` before if you don't want that. */ export declare const dropKeys: <T>(t: T, matcher?: DropKeyMatcher) => T; //# sourceMappingURL=drop-keys.function.d.ts.map