1.1.1 • Published 8 years ago

filename-ends-with v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

filename-ends-with

Check if filename ends with specific string.

Installation

$ npm install filename-ends-with --save

Usage

import fEndsWith from 'filename-ends-with';

fEndsWith('somefilename.jpg', '.jpg');
// => true

fEndsWith('somefilename.jpeg', '.jpg');
// => false

fEndsWith('somefilename.txt', ['.md', '.json', '.txt']);
// => true

Tests

$ npm test

License

MIT