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

defineRollerfunction

Register the element, as <korokoro-roller> unless another tag is asked for. Safe to call more than once, and does nothing where there are no custom elements (on a server).

Import it

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

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

Definition

function defineRoller(tag?: string): void

Parameters

NameTypeDescription
tag (optional)string

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

Examples

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

What it prints (run when this page was built)

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