Total Complexity | 6 |
Complexity/F | 6 |
Lines of Code | 8 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
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 | } |