Finds an extension of given filenames
$ npm i ext-finder -g
npm i ext-finder --save
Usage: ext-finder [files] [options]
Options:
--version, -v Show version [boolean]
--help, -h Show help [boolean]
Examples:
ext-finder text.txt | Get extension of "text.txt" file
ext-finder text1.txt text2.txt | Get extensions of several files
ext-finder "new text.txt" | Get extensions of file with spaces in name
import extFinder from 'ext-finder'
// use
let extension = extfinder.getExtension("file.txt")
// 'txt'
let allExtensions = extFinder.(['file1.txt', 'file2.js', 'file3'])
// ['txt', 'js', undefined]
Copyright (c) 2017 dolfbarr
Licensed under the MIT license