Files
hoppscotch/helpers/lenses/imageLens.js
Kévin Dunglas 07f370d6d2 feat: better media types detection for JSON, XML and HTML lenses (#1438)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
2021-01-26 09:57:11 +05:30

10 lines
314 B
JavaScript

const imageLens = {
lensName: "Image",
isSupportedContentType: (contentType) =>
/\bimage\/(?:gif|jpeg|png|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i.test(contentType),
renderer: "imageres",
rendererImport: () => import("~/components/lenses/renderers/ImageLensRenderer"),
}
export default imageLens