...
|
...
|
@@ -6,7 +6,7 @@ export default function trimObject(obj) { |
|
|
}
|
|
|
|
|
|
return Object.keys(obj).reduce(function(acc, key) {
|
|
|
acc[key.trim()] = typeof obj[key] == 'string' ? obj[key].trim() : trimObj(obj[key]);
|
|
|
acc[key.trim()] = typeof obj[key] == 'string' ? obj[key].trim() : trimObject(obj[key]);
|
|
|
return acc;
|
|
|
}, Array.isArray(obj) ? [] : {});
|
|
|
} |
...
|
...
|
|