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

rollLabelfunction

A roll's label, checked: a few words with no control characters and nothing notation is written with, or undefined.

Import it

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

Definition

function rollLabel(label: unknown): string | undefined

Parameters

NameTypeDescription
labelunknown

The optional short text that describes a roll.

Returns

string | undefined

A roll's label, checked: a few words with no control characters and nothing notation is written with, or undefined.

Examples

import { rollLabel } from "@johnmorrisdotca/korokoro";
console.log(rollLabel(" fire damage "));
fire damage

What it prints (run when this page was built)

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