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

compareTextfunction

A comparison as notation writes it: >=8, =1, <>3.

Import it

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

Definition

function compareText(compare: Compare): string

Parameters

NameTypeDescription
compareCompare

The comparison operator and numeric threshold.

Returns

string

A comparison as notation writes it: >=8, =1, <>3.

Examples

import { compareText } from "@johnmorrisdotca/korokoro";
console.log(compareText({ op: ">=", n: 5 }));
>=5

What it prints (run when this page was built)

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