summaryrefslogtreecommitdiff
path: root/node_modules/is-image/readme.md
blob: 8f0c442d417e31bdf4dcce22033f06eae2d41301 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# is-image [![Build Status](https://travis-ci.org/sindresorhus/is-image.svg?branch=master)](https://travis-ci.org/sindresorhus/is-image)

> Check if a filepath is an image


## Install

```
$ npm install --save is-image
```


## Usage

```js
var isImage = require('is-image');

isImage('src/unicorn.png');
//=> true

isImage('src/unicorn.txt');
//=> false
```


## Related

- [image-extensions](https://github.com/arthurvr/image-extensions) - List of image extensions


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)