Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

339 B
Raw Blame
import type { Account, SafeAccount } from '../../shared/types/domain.ts';

const SECRET_FIELDS: (keyof Account)[] = ['accessToken'];

export function safeAccount(account: Account): SafeAccount {
    const copy: Partial<Account> = { ...account };
    for (const field of SECRET_FIELDS) delete copy[field];
    return copy as SafeAccount;
}