Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
141
rated 0 times [  146] [ 5]  / answers: 1 / hits: 35520  / 15 Years ago, wed, july 22, 2009, 12:00:00

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 know of a tool that does this for Javascript? At the very least give a list of unused/used methods, so I could do the manually trimming? This would be in addition to running something like the YUI Javascript compressor tool...



Otherwise my thought is to write a perl script to attempt to help me do this.


More From » javascript

 Answers
110

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



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

[#99074] Saturday, July 18, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jimmieo

Total Points: 515
Total Questions: 102
Total Answers: 110

Location: Kazakhstan
Member since Mon, Sep 26, 2022
2 Years ago
;