Skip to content

Instantly share code, notes, and snippets.

View iemejia's full-sized avatar

Ismaël Mejía iemejia

View GitHub Profile
@iemejia
iemejia / pp_json_bom.js
Last active October 19, 2015 19:24 — forked from rgamez/pp_json_bom.js
Pretty print a json skipping the BOM if present
#!/usr/bin/env node
var fs = require('fs');
var prettyPrint = function(json) {
return JSON.stringify(JSON.parse(json), null, ' ');
};
var args = process.argv.slice(2);
if (args.length == 0 || args.length > 1) {