mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-08 10:30:27 -06:00
11 lines
280 B
TypeScript
11 lines
280 B
TypeScript
import "server-only";
|
|
|
|
import { TResponseTtc } from "@formbricks/types/responses";
|
|
|
|
export function calculateTtcTotal(ttc: TResponseTtc) {
|
|
const result = { ...ttc };
|
|
result._total = Object.values(result).reduce((acc: number, val: number) => acc + val, 0);
|
|
|
|
return result;
|
|
}
|