Skip to content

Instantly share code, notes, and snippets.

View hamzahasbi's full-sized avatar
:atom:
Self-branding

Hasbi Hamza hamzahasbi

:atom:
Self-branding
View GitHub Profile
@hamzahasbi
hamzahasbi / formatjson.js
Created June 11, 2016 15:52 — forked from kristopherjohnson/formatjson.js
Read JSON from standard input and writes formatted JSON to standard output. Requires Node.js.
#!/usr/bin/env node
// Reads JSON from stdin and writes equivalent
// nicely-formatted JSON to stdout.
var stdin = process.stdin,
stdout = process.stdout,
inputChunks = [];
stdin.resume();