We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 988174a commit b3349ebCopy full SHA for b3349eb
doc/api.txt
@@ -1539,11 +1539,13 @@ node> require("path").dirname("/foo/bar/baz/asdf/quux")
1539
------------------------------------
1540
+
1541
1542
-+path.filename(p)+::
++path.basename(p, ext)+::
1543
Return the last portion of a path. Similar to the Unix +basename+ command. Example:
1544
1545
1546
-node> require("path").filename("/foo/bar/baz/asdf/quux")
+node> require("path").filename("/foo/bar/baz/asdf/quux.html")
1547
+"quux.html"
1548
+node> require("path").filename("/foo/bar/baz/asdf/quux.html", ".html")
1549
"quux"
1550
1551
0 commit comments