mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
per: https://github.com/joyent/node/pull/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: https://github.com/nodejs/node/pull/2378