import { parseFieldValue } from "https://deno.land/x/http_utils@1.0.0-beta.5/headers.ts";
Parse the header field value.
Split field values by <quoted-string>
or <token>
.
import { parseFieldValue } from "https://deno.land/x/http_utils@$VERSION/mod.ts";
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts";
assertEquals(
parseFieldValue("text/html, image/webp;q=0.8"),
["text/html", "image/webp;q=0.8"],
);
assertEquals(parseFieldValue(`"Sat, 04 May 1996", "Wed, 14 Sep 2005"`), [
`"Sat, 04 May 1996"`,
`"Wed, 14 Sep 2005"`,
]);