MCPcopy
hub / github.com/tinyhttp/tinyhttp / reqIs

Function reqIs

packages/req/src/index.ts:54–55  ·  view source on GitHub ↗
(req: Pick<Request, 'headers'>)

Source from the content-addressed store, hash-verified

52 req.headers['X-Requested-With'] === 'XMLHttpRequest'
53
54export const reqIs = (req: Pick<Request, 'headers'>) => (...types: string[]): boolean =>
55 typeIs(req.headers['content-type'], ...types)

Callers 1

req.test.tsFile · 0.90

Calls 1

typeIsFunction · 0.90

Tested by

no test coverage detected