Parse JavaScript to instrument code

前端 未结 5 1480
醉酒成梦
醉酒成梦 2021-02-09 05:56

I need to split a JavaScript file into single instructions. For example

a = 2;
foo()
function bar() {
    b = 5;
    print(\"spam\");
}

has to

5条回答
  •  不要未来只要你来
    2021-02-09 06:47

    Why not try a javascript beautifier?

    For example http://jsbeautifier.org/

    Or see Command line JavaScript code beautifier that works on Windows and Linux

提交回复
热议问题