doc: add an example about multiple extensions
authorMaxime Quandalle <maxime.quandalle@gmail.com>
Sat, 1 Feb 2014 15:10:25 +0000 (16:10 +0100)
committerFedor Indutny <fedor.indutny@gmail.com>
Mon, 3 Feb 2014 08:38:40 +0000 (12:38 +0400)
`path.extname` returns only the last extension

doc/api/path.markdown

index fe59134..e01fa8b 100644 (file)
@@ -133,6 +133,10 @@ an empty string.  Examples:
     // returns
     '.html'
 
+    path.extname('index.coffee.md')
+    // returns
+    '.md'
+
     path.extname('index.')
     // returns
     '.'