Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
lib: Replacing the string concatenation with string template
  • Loading branch information
narkedi committed Nov 10, 2017
commit 352a9c37374dd4f70f52d5ccd226889bb2b442bb
8 changes: 4 additions & 4 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ function rethrow() {
var backtrace = new Error();
return function(err) {
if (err) {
backtrace.stack = err.name + ': ' + err.message +
backtrace.stack.substr(backtrace.name.length);
backtrace.stack = `${err.name}: ${err.message}` +
`${backtrace.stack.substr(${backtrace.name.length})}`;
throw backtrace;
}
};
Expand Down Expand Up @@ -1874,7 +1874,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 @@ -1887,7 +1887,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