mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
11 lines
219 B
TypeScript
11 lines
219 B
TypeScript
export const excludeKeys = <T extends Record<string, any>>(
|
|
obj: T,
|
|
keys: string[],
|
|
): T => {
|
|
const newObj = { ...obj };
|
|
keys.forEach((key) => {
|
|
delete newObj[key];
|
|
});
|
|
return newObj;
|
|
};
|