lib: replace string concatenation with template
PR-URL: https://github.com/nodejs/node/pull/16917 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This commit is contained in:
parent
1dba1620bb
commit
97bfeff084
@ -127,10 +127,10 @@ Agent.prototype.getName = function getName(options) {
|
||||
// Pacify parallel/test-http-agent-getname by only appending
|
||||
// the ':' when options.family is set.
|
||||
if (options.family === 4 || options.family === 6)
|
||||
name += ':' + options.family;
|
||||
name += `:${options.family}`;
|
||||
|
||||
if (options.socketPath)
|
||||
name += ':' + options.socketPath;
|
||||
name += `:${options.socketPath}`;
|
||||
|
||||
return name;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user