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

findForm.js ➔ ... ➔ document.forEach   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 1
rs 10
c 3
b 0
f 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