UNPKG
is-image
Version:
latest (4.0.0)
4.0.0
3.1.0
3.0.0
2.0.0
1.0.1
1.0.0
Check if a file path is an image
github.com/sindresorhus/is-image
sindresorhus/is-image
is-image
/
index.d.ts
16 lines
(12 loc)
•
236 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/** Check
if
a file
path
is an image. @example ``` import isImage from
'is-image'
; isImage(
'source/unicorn.png'
); //=>
true
isImage(
'source/unicorn.txt'
); //=>
false
``` */ export default
function
isImage
(filePath: string)
: boolean;