Skip to content
Closed
Changes from all commits
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
util: eliminate unecessary internal/util export
The objectToString method was only being used in one place
within internalUtil. It didn't make sense to have it as
a separate exported mnethod.
  • Loading branch information
jasnell committed Feb 18, 2017
commit 889e791d4b43e300b7a478d8712afdbcdca47326
7 changes: 2 additions & 5 deletions lib/internal/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ exports.decorateErrorStack = function decorateErrorStack(err) {
};

exports.isError = function isError(e) {
return exports.objectToString(e) === '[object Error]' || e instanceof Error;
};

exports.objectToString = function objectToString(o) {
return Object.prototype.toString.call(o);
return Object.prototype.toString.call(e) === '[object Error]' ||
e instanceof Error;
};

const noCrypto = !process.versions.openssl;
Expand Down