Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

path.extname to behave like basename #5525

arieljake opened this Issue May 22, 2013 · 2 comments


None yet
3 participants

it would be convenient for parsing conventions in filenames if there was an additional parameter to extname like basename of the form ", [ext]".


var fileName = "index.mobile.html";

path.extname(fileName) // ".html"
path.extname(fileName,".html") // ".mobile

xavi- commented Jul 8, 2013

This functionality should probably be implemented as a module instead of becoming part of core. I believe the powers at be want to keep core as minimal as possible.


jasnell commented Jun 24, 2015

+1 on doing this with a module. I see little benefit to changing this in core.

@jasnell jasnell closed this Jun 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment