1.0.1 • Published 8 years ago

has-ext v1.0.1

Weekly downloads
88
License
MIT
Repository
github
Last release
8 years ago

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