cli-output

1.0.0 • Public • Published

cli-output

My take on simple output for Node.js command-line apps!

node npm Travis Gemnasium Coveralls

ScreenShot

installation:

⇒ npm install cli-output

API:

var out = require("cli-output");

out.debug()

For debugging purposes. Expects same arguments as console.log().

This output is only shown if the environment variable ${DEBUG} is set.

out.error()

For error messages. Expects same arguments as console.error().

out.log()

For normal messages. Expects same arguments as console.log().

Alias: out.info()

out.success()

For success messages. Expects same arguments as console.log().

out.prettyJSON(json)

Outputs json in terminal-friendly manner, without the braces, double quotes, etc.

Alias: out.pjson(json)

out.rawJSON(json)

Outputs json in its normal format but with indentations.

Alias: out.rjson(json)

out.setPS1(ps1)

Sets the marker/PS1 used from " >>> " to ps1.

Also, the marker automatically defaults to the environment variable ${CLI_OUTPUT_PS1}, if it is a non-empty string.

license:

The MIT License (MIT)

Copyright (c) 2015-2016 GochoMugo mugo@forfuture.co.ke

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    4
  • 0.1.0
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i cli-output

Weekly Downloads

4

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gochomugo