2.0.2 • Published 7 years ago

printx v2.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

printx

Simple print toolbox for node.js.

Colors are provided via the chalk module, which should be safe for screens without color support.

Installation

$ yarn install printx

API

General usage:

import printx from 'printx'

printx.info('Hello', 'World')
// stdout: "[INFO] Hello World"

Available functions:

functiondescriptionexample out
info(...args)prepends blue INFO[INFO] Hello World
notify(...args)prepends '>', writes green> Hello World
warn(...args)prepends yellow 'WARN'[WARN] Hello World
error(...args)prepends red 'ERROR', prints to stderr[ERROR] Hello World
date(...args)prepends the local date/time in bold[MM/DD/YYYY, HH:MM:SS] Hello World
time(...args)prepends the current epoch in bold[1510527590629] Hello World
label(lbl, ...args)prepends lbl arg in bold with colonfoobar: Hello World
status(pct)prints a 'live' status bar. pct is the completion as a decimal number 0,1[========= ] 90%
sep(str = '-')writes a separator to width of stdout. str is - by default.----------------
2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago