(searchParameters: Record<string, unknown>)
| 1095 | const isToughCookieJar = (cookieJar: PromiseCookieJar | ToughCookieJar): cookieJar is ToughCookieJar => cookieJar.setCookie.length === 4 && cookieJar.getCookieString.length === 0; |
| 1096 | |
| 1097 | function validateSearchParameters(searchParameters: Record<string, unknown>): asserts searchParameters is Record<string, string | number | boolean | undefined> { |
| 1098 | for (const key of Object.keys(searchParameters)) { |
| 1099 | if (key === '__proto__') { |
| 1100 | continue; |
| 1101 | } |
| 1102 | |
| 1103 | const value = searchParameters[key]; |
| 1104 | assertAny(`searchParams.${key}`, [is.string, is.number, is.boolean, is.null, is.undefined], value); |
| 1105 | } |
| 1106 | } |
| 1107 | |
| 1108 | /** |
| 1109 | All parsing methods supported by Got. |
no test coverage detected
searching dependent graphs…