Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/path.js b/lib/path.js
index 427d158e7a7..90129f1f529 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -36,7 +36,7 @@ const {
function assertPath(path) {
if (typeof path !== 'string') {
- throw new ERR_INVALID_ARG_TYPE('path', 'string');
+ throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
}
}
@@ -747,7 +747,7 @@ const win32 = {
basename: function basename(path, ext) {
if (ext !== undefined && typeof ext !== 'string')
- throw new ERR_INVALID_ARG_TYPE('ext', 'string');
+ throw new ERR_INVALID_ARG_TYPE('ext', 'string', ext);
assertPath(path);
var start = 0;
var end = -1;
@@ -1295,7 +1295,7 @@ const posix = {
basename: function basename(path, ext) {
if (ext !== undefined && typeof ext !== 'string')
- throw new ERR_INVALID_ARG_TYPE('ext', 'string');
+ throw new ERR_INVALID_ARG_TYPE('ext', 'string', ext);
assertPath(path);
var start = 0;