1.2.3 • Published 4 months ago

@sylvanas-cry/json-lines-colorize v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

json-lines-colorize

Colorizes the JSON-strings input stream (stdin).

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.

1.2.3

4 months ago

1.2.2

9 months ago

1.2.1

10 months ago

1.2.0

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago