1.1.1 • Published 8 years ago
filename-ends-with v1.1.1
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