is-image-filename
v1.0.0
Published
detect if a filename is an image
Downloads
1,791
Readme
is-image-filename
A webpack compatible version of is-image
Check if a file name is an image
It just checks the extension of the filename you give it
Install
$ npm install is-image-filename
Usage
const isImage = require('is-image-filename');
isImage('src/unicorn.png');
//=> true
isImage('src/unicorn.txt');
//=> false
Related
- is-image - Check if a filepath is an image
- image-extensions - List of image extensions
- file-extension - get the file extension
License
MIT