Skip to content

Instantly share code, notes, and snippets.

@niedzielski
Created January 26, 2019 01:33
Show Gist options
  • Save niedzielski/50e120d6c5209bde0546da076e6c2875 to your computer and use it in GitHub Desktop.
Save niedzielski/50e120d6c5209bde0546da076e6c2875 to your computer and use it in GitHub Desktop.
Pretty-print a JSON string from stdin.
node -pe 'JSON.stringify(JSON.parse(require("fs").readFileSync(0)), null, 2)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment