pretty-clipboard v0.0.29
pretty-clipboard
Pretty print JSON like objects found in the clipboard to console.
Also dumps JSON found within strings recursively.
Installation
npm install -g pretty-clipboardUsage
Say you have some JSON-like string in your clipboard among other text
Some text {'foo': "bar", name: null, count: 1234, bool: true, python: None, "Object": { inner: 1, test: 'string'} } more textYou can pretty print it to the console using inspect with
pcGives output

To pretty print a correctly stringified JSON object, use jc instead (no colours)
jcBonus
uc will unescape the clipboard contents (e.g. \n to newline, html entities, url encoded characters).
ucCopy the following text to the clipboard and give it a go
\u2728Hello\u2728
%D1%88%D0%B5%D0%BB%D0%BB%D1%8B
%3Fx%3Dtest\nHello%20World
line1\nline2\nline3\ttabbed
test&test "hey" 'there'Notes for pc and jc
Repairs common JSON errors like single quotes, missing quotes, trailing commas, missing commas.
Also repairs quoted keys and values e.g. as used in Kibana logs.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago