Function
checkForExistence
(
options: Pick<RequestOptions, "auth" | "query"> & {
headers: Headers
},
name?: string,
)
Source from the content-addressed store, hash-verified
| 89 | } |
| 90 | |
| 91 | const 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 | |
| 106 | export const setAuthParams = async ({ |
| 107 | security, |
Tested by
no test coverage detected