As stated in the comments, the process of removing white spaces and new lines in javascript is called "minification". For doing the reverse process we need to look for tools that "unminify" the code. On the command line, we can do it installing jsbeautifier with pip:
pip install jsbeautifier
And we can use it like this:
js-beautify myMinifiedFile.js > myNewUnminifiedFile.js
Alternatively, there're online tools like unminify.com where we can just paste the code and it'll do the reverse process.
PS: Minification is not generally a reversible operation, as information could be lost in the process. So, tools like these are used only to beautify the code.
;as a line break can alter the meaning of the code if it happens to be quoted. If you can be sure that this is not the case then the task is easy.jsbeautifierwhen in rare need of batch unminifying:pip install jsbeautifierto install.