Hi team, It is common practice to include an additional filter for extensions, exposing `extname` avoids dependency on node's `path`. But the current `extname` behavior in pluginutils is different from the node version when the name starts or ends with a dot: | filename | node | pluginutils | | --- | --- | --- | | `.file` | `''` | `'.file'` | | `/.file` | `''` | `'.file'` | | `./.file` | `''` | `'.file'` | | `file.` | `'.'` | `''` | | `./file.` | `'.'` | `''` | this behave like in node, and do not depends in `basename`: ``` js function extname ( path ) { const match = /(?!\.\/\\|\.\.)[^/\\](\.[^./\\]*)$/.exec( path ); return match ? match[1] : ''; } ``` I can submit a PR if you wish.
Hi team,
It is common practice to include an additional filter for extensions, exposing
extnameavoids dependency on node'spath.But the current
extnamebehavior in pluginutils is different from the node version when the name starts or ends with a dot:.file'''.file'/.file'''.file'./.file'''.file'file.'.'''./file.'.'''this behave like in node, and do not depends in
basename:I can submit a PR if you wish.