Measure the purity of the function

Is there an existing detection solution if the function is pure or unclean, or the degree of purity using some metrics?

The fact is that I want to transfer my existing application code to a more functional one, and one of the desires is to reduce the impurity of functions to a minimum level. I can do it manually, but if you can automate, why not?

I know cyclic complexity can be measured with tools like ESLint , so I think cleanliness can also be.

+4
source share

All Articles