Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

Reference · Rolls and exact odds

isClothfunction

Whether a text names a cloth.

Import it

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

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/korokoro";
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/korokoro 1.16.0.