Is there a tool to remove unused methods in javascript?

前端 未结 7 1872
一生所求
一生所求 2020-12-02 19:50

I\'ve got a collection of javascript files from a 3rd party, and I\'d like to remove all the unused methods to get size down to a more reasonable level.

Does anyone

相关标签:
7条回答
  • 2020-12-02 20:52

    Following would help:

    1. If you have fully covered test cases, running Code Coverage tool like istanbul (https://github.com/gotwarlost/istanbul) or nyc (https://github.com/istanbuljs/nyc), would give a hint of untouched functions.

    2. At least the above will help find the covered functions, that you may thought unused.

    0 讨论(0)
提交回复
热议问题