Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 19 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | // formToObject |
||
2 | function formEvent(form, rest_form, error, success) { |
||
3 | console.log(form); |
||
4 | |||
5 | form.addEventListener("submit", function (event) { |
||
6 | console.log(this); |
||
7 | |||
8 | var data = formToObject(this); |
||
9 | var method = data.method; |
||
10 | delete data.method; |
||
11 | delete data.submit; |
||
12 | |||
13 | console.log(method); |
||
14 | |||
15 | rest_form.byMethod(method, data); |
||
16 | console.log(data); |
||
17 | |||
18 | event.preventDefault(); |
||
19 | }); |
||
20 | } |
||
21 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.