Skip to main content
Module

x/http_utils/header.ts>isContentNegotiationHeader

HTTP utility collection for Fetch API
Go to Latest
function isContentNegotiationHeader
import { isContentNegotiationHeader } from "https://deno.land/x/http_utils@1.0.0-beta.15/header.ts";

Whether the input is ContentNegotiationHeader or not.

Examples

Example 1

import { isContentNegotiationHeader } from "https://deno.land/x/http_utils@$VERSION/mod.ts";
import { assert } from "https://deno.land/std@$VERSION/testing/asserts.ts";

assert(isContentNegotiationHeader("accept"));
assert(!isContentNegotiationHeader("<others>"));

Parameters

input: string