mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-05 02:58:36 -06:00
12 lines
365 B
TypeScript
12 lines
365 B
TypeScript
import { TAccountInput, ZAccountInput } from "@formbricks/types/account";
|
|
|
|
export const filterAccountInputData = (account: any) => {
|
|
const supportedProps = Object.keys(ZAccountInput.shape);
|
|
return supportedProps.reduce((acc, prop) => {
|
|
if (account.hasOwnProperty(prop)) {
|
|
acc[prop] = account[prop];
|
|
}
|
|
return acc;
|
|
}, {} as TAccountInput);
|
|
};
|