An open API service indexing awesome lists of open source software.

https://github.com/bukinoshita/is-extname

Check file extension name
https://github.com/bukinoshita/is-extname

extension extname file filetype type

Last synced: 7 months ago
JSON representation

Check file extension name

Awesome Lists containing this project

README

          

# is-extname [![Build Status](https://travis-ci.org/bukinoshita/is-extname.svg?branch=master)](https://travis-ci.org/bukinoshita/is-extname)

> Check file extension name

## Install

```bash
$ yarn add is-extname
```

## Usage

```js
const isExtname = require('is-extname')

const create = async file => {
const extname = isExtname(file, 'json')

if (extname) {
return await create()
}

return new TypeError(`We don't support this type of file.`)
}
```

## License

MIT © [Bu Kinoshita](https://bukinoshita.io)