Reference · Rolls and exact odds
runClifunction
Run the command line. See koro --help for what it takes. One seed serves
the whole run: the rolls are drawn from it one after another, in the order
asked for, so the same command prints the same dice.
Import it
import { runCli } from "@johnmorrisdotca/korokoro";
Definition
function runCli(args: readonly string[], around?: CliSurroundings): CliResult
Parameters
| Name | Type | Description |
|---|---|---|
args | readonly string[] | Command-line arguments, without the executable name. |
around (optional) | CliSurroundings | Environment, locale, clock and input supplied by the host. |
Returns
CliResult
Run the command line. See koro --help for what it takes. One seed serves the whole run: the rolls are drawn from it one after another, in the order asked for, so the same command prints the same dice.
Examples
import { runCli } from "@johnmorrisdotca/korokoro";
console.log(runCli(["2d6", "--seed", "table"]).code);0What it prints (run when this page was built)