https://github.com/frenchbread/filename-ends-with
Check if filename ends with specific string.
https://github.com/frenchbread/filename-ends-with
Last synced: about 1 month ago
JSON representation
Check if filename ends with specific string.
- Host: GitHub
- URL: https://github.com/frenchbread/filename-ends-with
- Owner: frenchbread
- License: mit
- Created: 2016-08-01T10:18:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T10:29:10.000Z (almost 9 years ago)
- Last Synced: 2025-03-29T20:01:56.655Z (about 2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filename-ends-with
> Check if filename ends with specific string.
[](https://nodei.co/npm/filename-ends-with/)
### Installation
```
$ npm install filename-ends-with --save
```### Usage
```js
import fEndsWith from 'filename-ends-with';
fEndsWith('somefilename.jpg', '.jpg');
// => truefEndsWith('somefilename.jpeg', '.jpg');
// => falsefEndsWith('somefilename.txt', ['.md', '.json', '.txt']);
// => true```
### Tests
```
$ npm test
```### License
[MIT](https://github.com/frenchbread/filename-ends-with/blob/master/LICENSE)