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 MylesBorins committed Nov 17, 2017
1 parent 14f8cee commit 4faf2ec
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 @@ -101,7 +101,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 @@ -1843,7 +1843,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 @@ -1852,7 +1852,7 @@ fs.mkdtempSync = function(prefix, options) {
throw new TypeError('filename prefix is required');
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 4faf2ec

Please sign in to comment.