(config)
| 7 | const allowedEmptyValuesInParam = ['name']; |
| 8 | |
| 9 | function removeEmptyValues(config) { |
| 10 | if (isEmptyArray(config.parameters)) { |
| 11 | return; |
| 12 | } |
| 13 | |
| 14 | for (const parameter of config.parameters) { |
| 15 | let emptyValueKeys = []; |
| 16 | forEachKeyValue(parameter, (key, value) => { |
| 17 | if (contains(allowedEmptyValuesInParam, key)) { |
| 18 | return; |
| 19 | } |
| 20 | |
| 21 | if (isEmptyValue(value)) { |
| 22 | emptyValueKeys.push(key); |
| 23 | } |
| 24 | }); |
| 25 | |
| 26 | emptyValueKeys.forEach(key => delete parameter[key]); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | export const NEW_SCRIPT = '_new'; |
| 31 |
no test coverage detected