zxcvbn-rs icon indicating copy to clipboard operation
zxcvbn-rs copied to clipboard

Please consider allowing developers to choose a list of matchers

Open saks opened this issue 4 years ago • 0 comments

Right now it is only possible to get a feedback for a password based on all possible factors (matchers). It is essentially all or nothing.

This behaviour may not be desirable for the case when only certain matchers matter. In our case we'd like to use zxcvbn-rs for our wasm project. We found that regex dependency is just too heavy and makes our wasm file huge for no reason (it adds ~1.5MB).

I can see why certain structs like SequenceMatch are private. But I'd like to explore any reasonable ways to configure a list of matchers.

One option could be an exposure of additional API that will enable more granular control. Another idea is to put certain matchers behind feature flags. I'm happy to help with experiments and an implementation.

Thoughts?

saks avatar Feb 11 '21 06:02 saks