Skip to content

StdinOptions ​

Stdin settings accepted by .stdin() and by the schema definitions.

Signatures ​

ts
interface StdinOptions {}

Members ​

Properties ​

consume ​

Whether this input consumes the stream alone.

ts
consume?: "exclusive" | "broadcast";

trim ​

Drop one trailing \n, \r\n, or \r from a single value read off the stream, so echo ./dir | mycli delivers './dir'. A string is the one kind that still carries the terminator at that point; every other kind drops it while decoding and is unaffected.

ts
trim?: boolean;

when ​

When this input reads the stdin stream.

ts
when?: "dash" | "missing" | "dash-or-missing";

See Also ​

Released under the MIT License.