Formatting🛠

ref #106
This commit is contained in:
2021-03-26 19:52:31 +01:00
parent 5bd3a463f0
commit 4167819e7a
4 changed files with 31 additions and 17 deletions

View File

@@ -1,15 +1,23 @@
<script context="module">
import { passwordStrength } from "check-password-strength";
export function password_strong_enough(password_change) {
let strength = passwordStrength(password_change);
return (strength?.contains.includes("lowercase") &&
strength?.contains.includes("uppercase") &&
strength?.contains.includes("number") &&
strength?.length > 9);
}
export function password_strong_enough_and_equal(password_change, password_confirm){
return password_strong_enough(password_change) && password_change === password_confirm;
}
import { passwordStrength } from "check-password-strength";
export function password_strong_enough(password_change) {
let strength = passwordStrength(password_change);
return (
strength?.contains.includes("lowercase") &&
strength?.contains.includes("uppercase") &&
strength?.contains.includes("number") &&
strength?.length > 9
);
}
export function password_strong_enough_and_equal(
password_change,
password_confirm
) {
return (
password_strong_enough(password_change) &&
password_change === password_confirm
);
}
</script>
<script>