has-ext
v1.0.1
Published
Check if a filepath has extension(s)
Downloads
517
Maintainers
Readme
has-ext
Check if a filepath has extension(s)
Install
$ npm install --save has-ext
Usage
var hasExt = require('has-ext');
hasExt('file.txt', 'txt');
//=> true
hasExt('file.TXT', 'txt');
//=> true
hasExt('file.png', 'txt')
//=> false
hasExt('file.jpg', ['png', 'jpg'])
//=> true
hasExt('file.txt', ['png', 'jpg'])
//=> false