Skip to the content

Tane種

Reproduce numbers from a seed, shuffle or pick items, share a daily puzzle and resume a saved stream.

Tane means seed in Japanese. About the name

Contents

Reference · Streams, draws and seeds

runClifunction

Run the command line. See tane --help for what it takes. One seed serves the whole run, so the same command prints the same lines on every machine.

Import it

import { runCli } from "@johnmorrisdotca/tane";

Definition

function runCli(args: readonly string[], around?: CliSurroundings): CliResult

Parameters

NameTypeDescription
argsreadonly string[]

Arguments after the command name.

around (optional)CliSurroundings

Host environment, locale, clock, input and random source.

Returns

CliResult

The exit code and text for standard output and standard error.

Examples

import { runCli } from "@johnmorrisdotca/tane";

console.log(runCli(["--help"], { colour: false }).code);
0

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tane 1.3.0.