Completed
Push — master ( 6da7a0...d916e5 )
by Vitaly
31s
created

query.js ➔ query   B

Complexity

Conditions 6
Paths 3

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 6
c 1
b 0
f 0
nc 3
nop 1
dl 0
loc 8
rs 8.8571
1
export default function query(queryObject) {
2
    for (let param in queryObject) {
3
        if (queryObject.hasOwnProperty(param) && (queryObject[param] === undefined || queryObject[param] === '' || queryObject[param] === null) ) {
4
            delete queryObject[param];
5
        }
6
    }
7
    return queryObject;
8
}