# ext-finder

> Finds an extension of file

Latest version **1.0.8** (published 2022-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install ext-finder
pnpm add ext-finder
yarn add ext-finder
bun add ext-finder
```

Provides the command `ext-finder`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2022-06-27 |
| First published | 2017-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | dolfbarr |
| Maintainers | dolfbarr |
| Keywords | extension, file, lib, cli |

## Links

- npm: https://www.npmjs.com/package/ext-finder
- Repository: https://github.com/dolfbarr/ext-finder
- Homepage: https://github.com/dolfbarr/ext-finder#readme
- Issues: https://github.com/dolfbarr/ext-finder/issues
- npm.io page: https://npm.io/package/ext-finder

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ^7.0.2
- [colors](https://npm.io/package/colors.md) 1.4.0
- [semver](https://npm.io/package/semver.md) ^5.3.0
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.15

## Recent versions

- 1.0.8 (latest) — 2022-06-27
- 1.0.7 — 2022-06-27
- 1.0.6 — 2022-06-27
- 1.0.5 — 2022-06-27
- 1.0.4 — 2022-06-12
- 1.0.3 — 2022-06-11
- 1.0.2 — 2018-06-21
- 1.0.1 — 2017-07-25
- 1.0.0 — 2017-07-25
- 0.0.7 — 2017-04-12
- 0.0.6 — 2017-04-12
- 0.0.5 — 2017-04-11
- 0.0.4 — 2017-04-11

## README

# ext-finder
[![npm version](https://badge.fury.io/js/ext-finder.svg)](https://badge.fury.io/js/ext-finder) [![code style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com/) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dlf42/ext-finder/master/LICENSE)

Finds an extension of given filenames
# Instalation
## CLI
```shell
$ npm i ext-finder -g
```
## Lib
```shell
npm i ext-finder --save
```

# Usage

## CLI
```shell
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

```javascript
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) license

---
_Source: https://npm.io/package/ext-finder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
