filename-ends-with

1.1.1 • Public • Published

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

Package Sidebar

Install

npm i filename-ends-with

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • frenchbread