Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

Reference · Browser table and SVG

isClothfunction

Whether a text names a cloth.

Import it

import { isCloth } from "@johnmorrisdotca/tenka/ui";

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/tenka/ui";
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/tenka 2.4.0.