Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruyadorno/path-complete-extname
path.extname implementation adapted to also include multiple dots extensions.
https://github.com/ruyadorno/path-complete-extname
extension extname file javascript js nodejs npm path
Last synced: 11 days ago
JSON representation
path.extname implementation adapted to also include multiple dots extensions.
- Host: GitHub
- URL: https://github.com/ruyadorno/path-complete-extname
- Owner: ruyadorno
- License: mit
- Created: 2014-08-27T15:31:37.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-04-15T22:05:46.000Z (over 1 year ago)
- Last Synced: 2024-10-17T03:14:51.893Z (21 days ago)
- Topics: extension, extname, file, javascript, js, nodejs, npm, path
- Language: JavaScript
- Size: 41 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# path-complete-extname
[![Build Status](https://travis-ci.org/ruyadorno/path-complete-extname.svg?branch=master)](https://travis-ci.org/ruyadorno/path-complete-extname)
[path.extname](http://nodejs.org/api/path.html#path_path_extname_p) implementation adapted to also include multiple dots extensions.
## About
This module contains the native implementation of [Node.js](http://nodejs.org/) `path.extname` method adapted to get complete extension names.
### Example
```js
var path = require('path');
var pathCompleteExtname = require('path-complete-extname');var filename = 'myfile.tar.gz';
path.extname(filename); // .gz
pathCompleteExtname(filename); // .tar.gz
```For more information about what filenames are valid and what will be returned in each case, see the **test.js** file.
## License
Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).