Commit b5da894
doc: update path.extname documentation
per: nodejs/node-v0.x-archive#8509
originally submitted by @thauburger
Adding an additional example to path.extname documentation
to demonstrate the case where the first character of the last
path component is '.'. This case is interesting, as something
like path.extname('.txt') returns an empty string. In this
case, .txt can be used as a valid file name (while arguably
maintaining an extension). I agree with Node's behavior in this
case, but I think the added example provides additional clarity
for the developer.
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: #23781 parent 1d4ea60 commit b5da894Copy full SHA for b5da894
File tree
Expand file treeCollapse file tree
1 file changed
+4
-0
lines changedOpen diff view settings
Filter options
- doc/api
Expand file treeCollapse file tree
1 file changed
+4
-0
lines changedOpen diff view settings
Collapse file
+4Lines changed: 4 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
183 | 183 | |
184 | 184 | |
185 | 185 | |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
186 | 190 | |
187 | 191 | |
188 | 192 | |
|
0 commit comments