MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / isUserProfile

Function isUserProfile

apps/api/tests/api/auth/auth.routes.test.ts:78–91  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

76 "user" in value.data;
77
78const isUserProfile = (value: unknown): value is IUserProfile => {
79 if (
80 value === null ||
81 typeof value !== "object" ||
82 !("user" in value) ||
83 value.user === null ||
84 typeof value.user !== "object" ||
85 !("email" in value.user)
86 ) {
87 return false;
88 }
89
90 return typeof value.user.email === "string";
91};
92
93const extractCookiePair = (setCookie: string | null, name: string): string => {
94 if (setCookie === null) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected