binary
import { binary } from "jsr:@ende/http/unstable-structured-fields";function ยท experimental
function binary(value: Uint8Array): Extract<BareItem, { type: "binary" }>Creates a binary Bare Item.
value: Uint8ArrayThe binary value as a Uint8Array.
Returns
A Bare Item of type binary.
Example: Usage
import { binary } from "@ende/http/unstable-structured-fields";
import { assertEquals } from "@ende/assert";
const result = binary(new Uint8Array([1, 2, 3]));
assertEquals(result.type, "binary");