UNPKG

@pronix/hyper-flow

Version:

Framework for building progressive console applications on node.js platform

12 lines (9 loc) 503 B
import chalk from 'chalk' import { ICommand } from '../types/hyper.types' export const renderCommands = (commands: Array<ICommand>): string => ` ${ chalk.bold.greenBright`available commands:` } ${ chalk.yellowBright.italic(commands.map(c => c.cmd).join(' ')) } ` export const print = (str: any) => console.log(str) export const marker = (name: string | number) => `${ chalk.yellowBright.bold.italic`${ chalk.blueBright(name) }$ ` }` export default { renderCommands, print, marker }