Repository URL to install this package:
Version:
0.9.5 ▾
|
import { isString } from 'exotic'
export const imageRegExp = /\.(?:jpg|gif|png|svg|jpeg|webp)$/
export const isImage = x => isString(x) && imageRegExp.test(x)
export const isImageLike = x => x.startsWith('//') || x.startsWith('http') || x.startsWith('https')