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

meetsfunction

Whether a number meets a comparison.

Import it

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

Definition

function meets(compare: Compare, value: number): boolean

Parameters

NameTypeDescription
compareCompare

The comparison operator and numeric threshold.

valuenumber

The candidate face, value or name to check.

Returns

boolean

Whether a number meets a comparison.

Examples

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

What it prints (run when this page was built)

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