ext-finder
Finds an extension of given filenames
Instalation
CLI
$ npm i ext-finder -g
Lib
npm i ext-finder --save
Usage
CLI
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
Lib
import extFinder from 'ext-finder'
// use
let extension = extfinder.getExtension("file.txt")
// 'txt'
let allExtensions = extFinder.(['file1.txt', 'file2.js', 'file3'])
// ['txt', 'js', undefined]
License
Copyright (c) 2017 dolfbarr
Licensed under the MIT license