options.ts
This file
Path
source/utils/options.ts
16 lines · 445 bytes · TypeScript
Last changed by
Fix multipart boundary mismatch (#540)Kelvin Del Montebefore adoption0e9d7bb
History of this fileTake it
1234567891011121314151617import {kyOptionKeys, requestOptionsRegistry} from '../core/constants.js';
export const findUnknownOptions = ( request: Request, options: Record<string, unknown>,): Record<string, unknown> => { const unknownOptions: Record<string, unknown> = {};
for (const key in options) { if (!(key in requestOptionsRegistry) && !(key in kyOptionKeys) && !(key in request)) { unknownOptions[key] = options[key]; } }
return unknownOptions;};