mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-24 15:42:26 +03:00
3529222b95
* feat: add <ApiKeyConfig/> * feat(SDK): add update brain * feat: add removeUndefined helper * feat: remove unnecessary autofocus flag * add brain settings tab * ui: add tab delimitor * feat: improve ux
13 lines
253 B
TypeScript
13 lines
253 B
TypeScript
export const removeUndefined = <T extends Record<string, unknown>>(
|
|
obj: T
|
|
): Partial<T> => {
|
|
const newObj = {} as Partial<T>;
|
|
for (const key in obj) {
|
|
if (obj[key] !== undefined) {
|
|
newObj[key] = obj[key];
|
|
}
|
|
}
|
|
|
|
return newObj;
|
|
};
|