1
0
Fork 0
mirror of synced 2024-11-10 11:18:58 -05:00
ultimate-vim/functions/PrettifyJSON.js
2017-12-18 17:18:31 +08:00

12 lines
236 B
JavaScript

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)