@sylvanas-cry/json-lines-colorize
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

json-lines-colorize

Colorizes the JSON-strings input stream (stdin).

jlc

Installation

npm install -g @sylvanas-cry/json-lines-colorize

Usage

<output_stream> | jlc [options]

Where options is:

  • -c, --comma — add comma to the end of every JSON object
  • -n, --no-pretty — disable pretty-print of JSON objects
  • -o, --override <property>,<value>,<hex-color> — replaces property name and string literal colors with given hex-color if JSON object has property with value

Examples

echo '{"foo":"bar"}' | jlc
echo '{"level":"error","message":"error"}\n{"level":"log","message":"ok"}' | \
jlc -o level,error,ff0000
echo '{"a":"b"}\n{"c":"d"}' | jlc -o a,b,ff0000 -o c,d,\#00FF00
tail -f /var/log/my-service.log | jlc -n -c
kubectl logs -n my-namespace --follow my-pod | jlc

License

The scripts and documentation in this project are released under the MIT License.

Package Sidebar

Install

npm i @sylvanas-cry/json-lines-colorize

Weekly Downloads

5

Version

1.2.3

License

MIT

Unpacked Size

57.9 kB

Total Files

47

Last publish

Collaborators

  • sylvanas-cry