A Node wrapper around latexindent for beautifying LaTeX documents.
yarn add pretty-latex
or
npm install pretty-latex
You will also need to make sure you have latexindent installed on your system.
const fs = require('fs')
const beautify = require('pretty-latex')
const input = fs.createReadStream('input.tex')
const output = fs.createWriteStream('output.tex')
beautify(input).pipe(output)
MIT