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

Function checkForExistence

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

Source from the content-addressed store, hash-verified

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

Callers 1

setAuthParamsFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected