has-ext

1.0.1 • Public • Published

has-ext Build Status

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

Package Sidebar

Install

npm i has-ext

Weekly Downloads

98

Version

1.0.1

License

MIT

Last publish

Collaborators

  • torrottum