A
A
AlexeyMoshkin2016-09-30 09:06:33
JavaScript
AlexeyMoshkin, 2016-09-30 09:06:33

What is the easiest way to identify unused javascript code?

The bottom line is this: there is a js application, a lot of files with scripts, there is a namespace (functions are declared both inside the namespace and separately).
After a major refactoring, I would like to know which of the declared functions are not used (and which of the callables are not declared) - what is the easiest way to do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RubaXa, 2016-09-30
@RubaXa

Pass through istanbul and X% of users issue modified code, after every YY seconds, dump `window.__coverage__` to the server.

Result Example
14adee9dc5a247ab87bbfd107717b9c2.png3cac2096f1464c2da2fa3524caa11244.png

V
Vladimir Sergeevich, 2016-09-30
@VladimirZhid

I can advise you to run the project through the analyzer in JetBrains products (WebStorm, PhpStorm, etc.)
I have never seen better

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question