MCPcopy Create free account
hub / github.com/arctic-cli/interface / checkForExistence

Function checkForExistence

packages/sdk/js/src/v2/gen/client/utils.gen.ts:93–106  ·  view source on GitHub ↗
(
  options: Pick<RequestOptions, "auth" | "query"> & {
    headers: Headers
  },
  name?: string,
)

Source from the content-addressed store, hash-verified

91}
92
93const checkForExistence = (
94 options: Pick<RequestOptions, "auth" | "query"> & {
95 headers: Headers
96 },
97 name?: string,
98): boolean => {
99 if (!name) {
100 return false
101 }
102 if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
103 return true
104 }
105 return false
106}
107
108export const setAuthParams = async ({
109 security,

Callers 1

setAuthParamsFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected