Hello everybody
I wrote a library for a metering password as password-meter
I should use it like the following
let passwordMeter= new PasswordMeter({
minLength: 5,
maxLength: 10,
uppercaseLettersMinLength: 1,
lowercaseLettersMinLength: 2,
numbersMinLength: 1,
symbolsMinLength: 1,
include: ['a', '$'],
exclude: ['1baA$', '0xaZ$'],
startsWith: '1',
endsWith: '$',
blackList : ['123456','p@ssw0rd']
}, {
"40": "veryWeak", // 001 <= x < 040
"80": "weak", // 040 <= x < 080
"120": "medium", // 080 <= x < 120
"180": "strong", // 120 <= x < 180
"200": "veryStrong", // 180 <= x < 200
"_": "perfect" // x >= 200
}
let result = passwordMeter.getResult('1pwQvF@87$');
As you see, The constructor is not parameterless and you should pass two objects to the constructor
- Configs
- Ranges
How can I do this with Aurelia IoC (inject PasswordMeter to other classes)?
Does Aurelia DI just work with parameterless classes?