Completed
Pull Request — master (#234)
by
unknown
41s
created

js/lib/findForm.js   A

Complexity

Total Complexity 5
Complexity/F 1.67

Size

Lines of Code 8
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 7
Bugs 1 Features 0
Metric Value
cc 0
c 7
b 1
f 0
nc 1
dl 0
loc 8
rs 10
wmc 5
mnd 1
bc 5
fnc 3
bpm 1.6666
cpm 1.6666
noi 0
1
function fillPassword(user, password) {
2
    if(user){
3
        document.querySelectorAll('input[type=text], input[type=email]').forEach(function(x){x.value=user;});
4
    }
5
    if(password) {
6
        document.querySelectorAll('input[type=password]').forEach(function(x){ x.value=password;});
7
    }
8
}
9