Reference · Rolls and exact odds
CliSurroundingstype
What the command line is run in. All of it is optional.
Import it
import type { CliSurroundings } from "@johnmorrisdotca/korokoro";
Definition
type CliSurroundings = {
env?: Record<string, string | undefined>;
stdin?: string;
colour?: boolean;
locale?: string;
now?: number;
source?: RandomSource;
};
Members
| Name | Type | Description |
|---|---|---|
env (optional) | Record<string, string | undefined> | undefined | The environment, for the language ( |
stdin (optional) | string | undefined | Standard input, when |
colour (optional) | boolean | undefined | Whether the output is a terminal that shows colour. |
locale (optional) | string | undefined | The system's language where the environment names none: what |
now (optional) | number | undefined | The time, in epoch milliseconds, for the rolls made. Now, unless given. |
source (optional) | RandomSource | undefined | Where unseeded rolls come from. The crypto generator, unless given. |
Examples
import type { CliSurroundings } from "@johnmorrisdotca/korokoro";
const value: CliSurroundings = { env: {}, locale: "en" };
console.log(value.locale);enWhat it prints (run when this page was built)