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

Function readString

apps/api/src/lib/oauth/oauth.utils.ts:78–86  ·  view source on GitHub ↗
(obj: unknown, key: string)

Source from the content-addressed store, hash-verified

76 value !== null && typeof value === "object";
77
78export const readString = (obj: unknown, key: string): string => {
79 if (!isRecord(obj)) {
80 return "";
81 }
82
83 const value = obj[key];
84
85 return typeof value === "string" ? value : "";
86};
87
88export const readBoolean = (obj: unknown, key: string): boolean => {
89 if (!isRecord(obj)) {

Callers 4

fetchProfileMethod · 0.90
fetchProfileMethod · 0.90
fetchProfileMethod · 0.90

Calls 1

isRecordFunction · 0.70

Tested by

no test coverage detected