boolean

import { boolean } from "jsr:@ende/http/unstable-structured-fields";

function ยท experimental

function boolean(value: boolean): Extract<BareItem, { type: "boolean" }>

Creates a boolean Bare Item.

value: boolean

The boolean value.

Returns

A Bare Item of type boolean.

Example: Usage

import { boolean } from "@ende/http/unstable-structured-fields";
import { assertEquals } from "@ende/assert";

assertEquals(boolean(true), { type: "boolean", value: true });

Source