find dead JavaScript code?

后端 未结 8 927
醉酒成梦
醉酒成梦 2020-12-05 05:51

We are refactoring a legacy web app and as a result are \"killing\" quite a lot of JavaScript code but we\'re afraid of deleting what we think is dead code due to not being

8条回答
  •  情书的邮戳
    2020-12-05 06:48

    Without looking for anything too complex:

    • JSLint (not really a static analyzer, but if you give it your concatenated development code, you'll see what methods are never called, at least in obvious scoping contexts)
    • Google Closure Compiler
    • Google Closure Linter

提交回复
热议问题