stdio
- Version 2.1.3
- Published
- 39.3 kB
- No dependencies
- MIT license
Install
npm i stdio
yarn add stdio
pnpm add stdio
Overview
Standard input/output manager for Node.js
Index
Variables
variable stdio
const stdio: { getopt: ( config: import('./getopt').Config, command?: string[], options?: import('./getopt').Options | undefined ) => import('./getopt').GetoptResponse | null; read: ( lineHandler: import('./read').LineHandler, input?: NodeJS.ReadableStream ) => Promise<void>; readLine: typeof readLine; ask: typeof ask; ProgressBar: typeof ProgressBar;};
Functions
function ask
ask: (question: string, config?: AskConfig) => Promise<string>;
function getopt
getopt: ( config: Config, command?: string[], options?: Options | undefined) => GetoptResponse | null;
function read
read: (lineHandler: LineHandler, input?: NodeJS.ReadableStream) => Promise<void>;
function readLine
readLine: (options?: Options) => Promise<string>;
Classes
class ProgressBar
class ProgressBar {}
constructor
constructor( size?: number, { tickSize, silent, terminalWidth, }?: { tickSize?: number | undefined; silent?: boolean | undefined; terminalWidth?: number | undefined; });
property callback
callback: Function;
property lastRemainingTimes
lastRemainingTimes: number[];
property silent
silent: boolean;
property size
size: number;
property startTime
startTime: number;
property terminalWidth
terminalWidth: number;
property tickSize
tickSize: number;
property value
value: number;
method getEllapsed
getEllapsed: () => number;
method getRemaining
getRemaining: () => number;
method onFinish
onFinish: (callback: Function) => void;
method print
print: () => string;
method setValue
setValue: (value: number) => string;
method tick
tick: () => string;
method write
write: (text: string) => void;
Package Files (6)
Dependencies (0)
No dependencies.
Dev Dependencies (17)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/stdio
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/stdio)
- HTML<a href="https://www.jsdocs.io/package/stdio"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3422 ms. - Missing or incorrect documentation? Open an issue for this package.