S
S
step3072012-02-08 13:38:26
JavaScript
step307, 2012-02-08 13:38:26

Finding Unused Javascript Functions

The task is this - there are several js files stuffed with functions. The functions are quite heterogeneous, just piled together.

They can be used from other js modules, they can be written directly in html templates, or they can also appear in php sources.

You need to find functions that are definitely not called anywhere.

In fact, the task is simple - parse the specified files for function definitions, then parse another bunch of files for names. Issue a list of those that were not found or were found but very few.

In principle, it is not difficult to write it yourself, but what if there is already such a tool?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Baumgertner, 2012-02-08
@alexbaum

phpStorm IDE www.jetbrains.com/phpstorm/ but it's a development environment

M
Mark, 2012-02-10
@printf

The automatic method will not give one hundred percent certainty.

obj['method_' + 'name']();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question