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 · Embedded roller and die

defineDiefunction

Register <korokoro-die>, as that tag unless another is asked for. Safe to call more than once; does nothing where there are no custom elements.

Import it

import { defineDie } from "@johnmorrisdotca/korokoro/element";

Also exported from: @johnmorrisdotca/korokoro/element/define

Definition

function defineDie(tag?: string): void

Parameters

NameTypeDescription
tag (optional)string

The custom tag name; omitted to use the package default.

Examples

import { defineDie } from "@johnmorrisdotca/korokoro/element";
defineDie();
console.log(typeof defineDie); // function
function

What it prints (run when this page was built)

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