npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@concepto/console

v1.2.68

Published

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

Downloads

29

Readme

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

| Param | Type | Description | | --- | --- | --- | | value | Boolean | if true, hides all output |

open_console.time(id)

Calls timer start

Kind: instance method of open_console

| Param | Type | Description | | --- | --- | --- | | id | String | key ID to measure |

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

Calls timer end

Kind: instance method of open_console

| Param | Type | Description | | --- | --- | --- | | id | String | key ID to measure and show timming for. | | [data] | Object | var dump to include in output | | [color] | String | black,red,green,yellow,blue,purple,cyan,white | | [prefix] | String | use 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

| Param | Type | Description | | --- | --- | --- | | [prefix] | String | prefix | | [color] | String | black,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

| Param | Type | Description | | --- | --- | --- | | message | String | message to output | | [color] | String | black,red,green,yellow,blue,purple,cyan,white | | [prefix] | String | use 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

| Param | Type | Description | | --- | --- | --- | | format | String | format of progress message. Example: 'Progress {bar} - {percentage} %' | | [config] | Object | options overwrite for cli-progress multibar config | | [prefix] | String | use this prefix instead of the configured one. To use color, use format 'prefix,color' | | [formatData] | function | function(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

| Param | Type | Description | | --- | --- | --- | | message | String | message to output | | [data] | Object | var dump to include in output | | [color] | String | black,red,green,yellow,blue,purple,cyan,white | | [prefix] | String | use 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

| Param | Type | Description | | --- | --- | --- | | message | String | message to output | | [data] | Object | var dump to include in output | | [color] | String | black,red,green,yellow,blue,purple,cyan,white | | [prefix] | String | use 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

| Param | Type | Default | Description | | --- | --- | --- | --- | | title | String | | title to display | | [color] | String | white | color for box borders. | | [titleColor] | String | | color for title. If undefined, uses the box color. | | [config] | Object | | config overwrite params for boxen. | | [config.align] | String | center | aligns 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

| Param | Type | Description | | --- | --- | --- | | title | String | title for table | | data | Array | array of objects for building the table. | | [struct_sort] | String | sort data before displaying. Supports: field asc/desc. | | [color] | String | color for table. |


© 2020-2022 Pablo Schaffner <[email protected]>.