UNPKG

cmpstr-cli

Version:

Simple CLI wrapper for the CmpStr package to normalize and compare strings directly via terminal

26 lines (25 loc) 852 B
/** * @fileoverview * Output utility for CmpStr CLI. * * Handles writing results to stdout or a file, with optional * verbose mode and ANSI color stripping. * * @author Paul Köhler (komed3) * @license MIT */ import type { Config } from './types.js'; import { type Command } from 'commander'; /** * Outputs the result to the console or writes it to a file. * In verbose mode, includes input, options, and result sections. * Strips ANSI color codes when writing to a file. * * @async * @param {Partial<Config>} cfg - The resolved configuration object. * @param {Command} cmd - The Commander command instance. * @param {any} out - The output to display or write. * @returns {Promise<void>} * @throws {Error} If writing to the file fails. */ export declare function output(cfg: Partial<Config>, cmd: Command, out: any): Promise<void>;