Skip to content

Commit b3349eb

Browse files
isaacsry
isaacs
authored andcommitted
Documentation for path module changes.
1 parent 988174a commit b3349eb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,11 +1539,13 @@ node> require("path").dirname("/foo/bar/baz/asdf/quux")
15391539
------------------------------------
15401540
+
15411541

1542-
+path.filename(p)+::
1542+
+path.basename(p, ext)+::
15431543
Return the last portion of a path. Similar to the Unix +basename+ command. Example:
15441544
+
15451545
------------------------------------
1546-
node> require("path").filename("/foo/bar/baz/asdf/quux")
1546+
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")
15471549
"quux"
15481550
------------------------------------
15491551
+

0 commit comments

Comments
 (0)