1
0
Fork 0
mirror of synced 2024-06-30 20:41:09 -04:00
ultimate-vim/functions/PrettifyJSON.js

13 lines
236 B
JavaScript
Raw Normal View History

2017-12-18 04:18:31 -05:00
const fs = require('fs')
function prettifyJSON(filePath) {
fs.readFile(filePath, (err, data) => {
console.log(JSON.stringify(JSON.parse(data), null, 4));
});
};
const argFilePath = process.argv[2];
prettifyJSON(argFilePath)