Skip to main content
Module

x/http_utils/mod.ts>isRepresentationHeader

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

Whether the input is RepresentationHeader or not.

Examples

Example 1

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

assert(isRepresentationHeader("content-type"));
assert(!isRepresentationHeader("<others>"));

Parameters

input: string