lint cleanup
[squeep-logger-json-console] / lib / json-replacers.js
index 51eacb3cb5f2c8a259ce0bf55496ec64391fbb79..14ac3343ac348e7803eeac458b8386a1a18f266b 100644 (file)
@@ -62,9 +62,10 @@ function replacerHttpIncomingMessage(_key, value) {
       // This blurs entire auth string if no space found, because -1 from indexOf.
       const blurredAuthHeader = authHeader.slice(0, spaceIndex + 1) + '*'.repeat(authHeader.length - (spaceIndex + 1));
       // New headers object, as we change it.
-      newValue.headers = Object.assign({}, newValue.headers, {
+      newValue.headers = {
+        ...newValue.headers,
         authorization: blurredAuthHeader,
-      });
+      };
     }
     value = newValue;
   }