argparse-ts
Version:
Modern CLI arguments parser for node.js
33 lines (32 loc) • 988 B
TypeScript
import type { ArgConfigExtended } from "../types";
/**
* Generates a help message for an argument.
*
* @param argConfig - The argument configuration.
*
* @returns A 2D array of strings representing the help message.
*
* @category Utils
*/
export declare function formatArgHelp(argConfig: ArgConfigExtended): string[][];
/**
* Converts a two-dimensional array of strings into a table.
*
* @param data The two-dimensional array of strings.
* @param padding The amount of padding to add to each cell.
* @returns The table as a string.
*
* @category Utils
*/
export declare function convertToTable(data: string[][], padding?: number): string;
/**
* Formats a table of strings into a tabbed format.
*
* @param rows - The 2D array of strings to format.
* @param tabber - The tab character to use. Defaults to a standard tab.
*
* @returns The formatted strings.
*
* @category Utils
*/
export declare function tabTableRows(rows: string[][], tabber?: string): string[][];