Nascent Plasticine Materialist

    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

    Install

    npm i has-ext

    DownloadsWeekly Downloads

    23

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • torrottum