Skip to content

Commit

Permalink
lib: replace string concatenation with template
Browse files Browse the repository at this point in the history
PR-URL: #16933
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
narkedi authored and evanlucas committed Nov 13, 2017
1 parent 02ea0ee commit afbdd01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function rethrow() {
var backtrace = new Error();
return function(err) {
if (err) {
backtrace.stack = err.name + ': ' + err.message +
backtrace.stack = `${err.name}: ${err.message}` +
backtrace.stack.substr(backtrace.name.length);
throw backtrace;
}
Expand Down Expand Up @@ -1894,7 +1894,7 @@ fs.mkdtemp = function(prefix, options, callback) {
var req = new FSReqWrap();
req.oncomplete = callback;

binding.mkdtemp(prefix + 'XXXXXX', options.encoding, req);
binding.mkdtemp(`${prefix}XXXXXX`, options.encoding, req);
};


Expand All @@ -1907,7 +1907,7 @@ fs.mkdtempSync = function(prefix, options) {
}
options = getOptions(options, {});
nullCheck(prefix);
return binding.mkdtemp(prefix + 'XXXXXX', options.encoding);
return binding.mkdtemp(`${prefix}XXXXXX`, options.encoding);
};


Expand Down

0 comments on commit afbdd01

Please sign in to comment.