Skip to the content

Hitotsu一つ

Match the colour or number, call with one card left, and play classic or party rules against computers or at a shared table.

Hitotsu is Japanese for one: the call with one card left. About the name

Contents

Reference · Game engine and table

isClothfunction

Whether a text names a cloth.

Import it

import { isCloth } from "@johnmorrisdotca/hitotsu";

Definition

function isCloth(text: unknown): text is Cloth

Parameters

NameTypeDescription
textunknown

Text to parse, validate or format.

Returns

boolean

Whether a text names a cloth.

Examples

import { isCloth } from "@johnmorrisdotca/hitotsu";
console.log(isCloth("green"), isCloth("unknown"));
true false

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hitotsu 1.6.1.