MCPcopy Create free account
hub / github.com/GregBrimble/react-server-components-workshop / accepts

Function accepts

utils/headers.ts:3–4  ·  view source on GitHub ↗
(header: string | null, contentType: string)

Source from the content-addressed store, hash-verified

1import { mediaType } from "@hapi/accept";
2
3export const accepts = (header: string | null, contentType: string) =>
4 header && !!mediaType(header, [contentType]);

Callers 2

fetchFunction · 0.85
fetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected