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

isSidesfunction

Any die this package can throw: two to a thousand sides, or a Fate die.

Import it

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

Definition

function isSides(value: unknown): value is Sides

Parameters

NameTypeDescription
valueunknown

The candidate face, value or name to check.

Returns

boolean

Any die this package can throw: two to a thousand sides, or a Fate die.

Examples

import { isSides } from "@johnmorrisdotca/korokoro";
console.log(isSides(7), isSides("F"));
true true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.