Skip to the content

Kotoba言葉

Load only the word lists you need, mark repeated letters correctly and play a daily or seeded word game.

Kotoba is the Japanese word for words. About the name

Contents

Reference · Command line

CliResulttype

What the command line came to.

Import it

import type { CliResult } from "@johnmorrisdotca/kotoba/cli";

Definition

type CliResult = {
    code: 0 | 1 | 2;
    out: string;
    err: string;
};

Members

NameTypeDescription
code0 | 1 | 2

0 when all went well, 1 when what was asked for is not so or could not be done, 2 when the command itself was wrong.

outstring

For standard output.

errstring

For standard error.

Examples

import type { CliResult } from "@johnmorrisdotca/kotoba/cli";
import { runCli } from "@johnmorrisdotca/kotoba/cli";

const value: CliResult = await runCli(["--version"]);
console.log(value);
{ code: 0, out: '1.2.0\n', err: '' }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kotoba 1.2.0.