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

NotationChecktype

What checkNotation found: the spec, or the part it refused and why.

Import it

import type { NotationCheck } from "@johnmorrisdotca/korokoro";

Definition

type NotationCheck = {
    ok: true;
    spec: RollSpec;
} | {
    ok: false;
    problem: NotationProblem;
    part: string;
    message: string;
};

Examples

import type { NotationCheck } from "@johnmorrisdotca/korokoro";
import { checkNotation } from "@johnmorrisdotca/korokoro";
const value: NotationCheck = checkNotation("2d6");
console.log(value.ok);
true

What it prints (run when this page was built)

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