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

customFacesfunction

A custom die's faces, checked: the faces as given if every one is sound, or undefined.

Import it

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

Definition

function customFaces(faces: unknown): CustomFace[] | undefined

Parameters

NameTypeDescription
facesunknown

Physical face values, in the order thrown.

Returns

CustomFace[] | undefined

A custom die's faces, checked: the faces as given if every one is sound, or undefined.

Examples

import { customFaces } from "@johnmorrisdotca/korokoro";
console.log(customFaces([{ label: "Hit", value: 1 }, { label: "Miss", value: 0 }])?.map((face) => face.label));
[ 'Hit', 'Miss' ]

What it prints (run when this page was built)

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