🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

@concepto/console

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@concepto/console

Concepto DSL - visually create and maintain modern node.js based apps (@console)

latest
Source
npmnpm
Version
1.2.68
Version published
Weekly downloads
11
-8.33%
Maintainers
1
Weekly downloads
 
Created
Source

Concepto DSL Logo

A progressive Node.js framework for visually building efficient and scalable nodejs based applications.

NPM Version Package License NPM Downloads

Description

Advanced ES6 console output class used within Concepto DSL
Note you need to pass all arguments as an object with keys.

API Reference

Open_console: A class to help display information in the console.

open_console.setSilent(value)

Sets visibility output

Kind: instance method of open_console

ParamTypeDescription
valueBooleanif true, hides all output

open_console.time(id)

Calls timer start

Kind: instance method of open_console

ParamTypeDescription
idStringkey ID to measure

open_console.timeEnd(id, [data], [color], [prefix])

Calls timer end

Kind: instance method of open_console

ParamTypeDescription
idStringkey ID to measure and show timming for.
[data]Objectvar dump to include in output
[color]Stringblack,red,green,yellow,blue,purple,cyan,white
[prefix]Stringuse this prefix instead of the configured one. To use color, use format 'prefix,color'

open_console.setPrefix([prefix], [color])

Sets output prefix

Kind: instance method of open_console

ParamTypeDescription
[prefix]Stringprefix
[color]Stringblack,red,green,yellow,blue,purple,cyan,white

open_console.clear()

Clears the console screen

Kind: instance method of open_console

open_console.spinner(message, [color], [prefix]) ⇒ Object

Outputs an ora spinner with the given message, used prefix and color.

Kind: instance method of open_console
Returns: Object - - Object similar to ora object with an additional text(x) method

ParamTypeDescription
messageStringmessage to output
[color]Stringblack,red,green,yellow,blue,purple,cyan,white
[prefix]Stringuse this prefix instead of the configured one. To use color, use format 'prefix,color'

open_console.progress(format, [config], [prefix], [formatData]) ⇒ Object

Returns an instance of cli-progress with the given total amount, format, and color.

Kind: instance method of open_console
Returns: Object - - Object similar to cli-progress object with methods to create,update,remove progress bars

ParamTypeDescription
formatStringformat of progress message. Example: 'Progress {bar} - {percentage} %'
[config]Objectoptions overwrite for cli-progress multibar config
[prefix]Stringuse this prefix instead of the configured one. To use color, use format 'prefix,color'
[formatData]functionfunction(data) expects a return of a modified data instance. Inside you can control the format presentation and vars used inside the format argument. You also have access to special keys (progress,value,total,bar,eta,percentage,...all your data keys) and helper functions (data.funcs.colors and data.funcs.symbols).

open_console.out(message, [data], [color], [prefix])

Output a message to the console screen, with an optional var with data

Kind: instance method of open_console

ParamTypeDescription
messageStringmessage to output
[data]Objectvar dump to include in output
[color]Stringblack,red,green,yellow,blue,purple,cyan,white
[prefix]Stringuse this prefix instead of the configured one. To use color, use format 'prefix,color'

open_console.outT(message, [data], [color], [prefix])

Output a message to the console screen with timestamp, and an optional var with data

Kind: instance method of open_console

ParamTypeDescription
messageStringmessage to output
[data]Objectvar dump to include in output
[color]Stringblack,red,green,yellow,blue,purple,cyan,white
[prefix]Stringuse this prefix instead of the configured one. To use color, use format 'prefix,color'

open_console.title(title, [color], [titleColor], [config])

Displays the given text as a title

Kind: instance method of open_console

ParamTypeDefaultDescription
titleStringtitle to display
[color]Stringwhitecolor for box borders.
[titleColor]Stringcolor for title. If undefined, uses the box color.
[config]Objectconfig overwrite params for boxen.
[config.align]Stringcenteraligns the title by its value: left,center,right

open_console.table(title, data, [struct_sort], [color])

Shows data array as table in the console

Kind: instance method of open_console

ParamTypeDescription
titleStringtitle for table
dataArrayarray of objects for building the table.
[struct_sort]Stringsort data before displaying. Supports: field asc/desc.
[color]Stringcolor for table.

© 2020-2022 Pablo Schaffner <pablo@puntorigen.com>.

Keywords

creador

FAQs

Package last updated on 26 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts