Commit b5da8943 authored by James M Snell's avatar James M Snell Committed by Rod Vagg
Browse files

doc: update path.extname documentation

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
parent 1d4ea609
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment