Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
import
{ mediaType } from
"@hapi/accept"
;
2
3
export
const
accepts = (header: string | null, contentType: string) =>
4
header && !!mediaType(header, [contentType]);
Callers
2
fetch
Function · 0.85
fetch
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected