Is there a tool to remove unused methods in javascript?

前端 未结 7 1906
一生所求
一生所求 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:36

    No. Because you can "use" methods in insanely dynamic ways like this.

    obj[prompt("Gimme a method name.")]();
    

提交回复
热议问题