This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const predicate = (pred, whenTrueFn, whenFalseReturnValue) => (...args) => { | |
if (!pred(...args)) { | |
return whenFalseReturnValue | |
} | |
return whenTrueFn(...args) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
根据input输入情况,检验密码的强度,规则如下: | |
1. 纯数字,纯字母为:弱。 | |
2. 数字与字母组合为:中。 | |
3. 数字,字母,特殊字符@#$%^&*_+[]{}组合为:强。 | |
4. 以上长度必为8位以上。 | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code |