joyent/node — pull request #8509 by thauburger (2014-10-04 01:01:16+00:00)
Title: Update path.extname documentation

Adding an additional example to `path.extname` 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.