Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

277 B
Raw Blame
export const omit = <T extends object, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K> =>
  Object.keys(obj).reduce((acc: Record<string, unknown>, key) => {
    if (!keys.includes(key as K)) {
      acc[key] = obj[key as K];
    }

    return acc;
  }, {}) as Omit<T, K>;