Is there an existing solution to detect if a function is pure or impure, or the degree of purity using some metrics?
The case is, I want to transition my existing app code to more functional-style, and one of the desires is to reduce the impurity of functions to the bare minimum level. I can do it manually, but if can be automated, why not?
I know cyclomatic complexity can be measured with tools like ESLint, so I think purity can be too.
Aucun commentaire:
Enregistrer un commentaire