Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

path.extname to behave like basename #5525

Open
arieljake opened this Issue · 1 comment

3 participants

@arieljake

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

Example:

var fileName = "index.mobile.html";

path.extname(fileName) // ".html"
path.extname(fileName,".html") // ".mobile
@xavi-

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.