Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

path.extname to behave like basename #5525

Closed
arieljake opened this issue May 22, 2013 · 2 comments
Closed

path.extname to behave like basename #5525

arieljake opened this issue May 22, 2013 · 2 comments

Comments

@arieljake
Copy link

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-
Copy link

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
Copy link
Member

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 as completed Jun 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants