File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -157,9 +157,9 @@ changes:
157157
158158The ` path.extname() ` method returns the extension of the ` path ` , from the last
159159occurrence of the ` . ` (period) character to end of string in the last portion of
160- the ` path ` . If there is no ` . ` in the last portion of the ` path ` , or if the
161- first character of the basename of ` path ` (see ` path.basename() ` ) is ` . ` , then
162- an empty string is returned.
160+ the ` path ` . If there is no ` . ` in the last portion of the ` path ` , or if
161+ there are no ` . ` characters other than the first character of
162+ the basename of ` path ` (see ` path.basename() ` ) , an empty string is returned.
163163
164164``` js
165165path .extname (' index.html' );
@@ -176,6 +176,9 @@ path.extname('index');
176176
177177path .extname (' .index' );
178178// Returns: ''
179+
180+ path .extname (' .index.md' );
181+ // Returns: '.md'
179182```
180183
181184A [ ` TypeError ` ] [ ] is thrown if ` path ` is not a string.
You can’t perform that action at this time.
0 commit comments