MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / isIcoFile

Function isIcoFile

apps/api/src/controllers/misc.controller.ts:120–126  ·  view source on GitHub ↗
(url: string, contentType?: string)

Source from the content-addressed store, hash-verified

118
119// Check if URL is an ICO file
120function isIcoFile(url: string, contentType?: string): boolean {
121 return (
122 url.toLowerCase().endsWith('.ico') ||
123 contentType === 'image/x-icon' ||
124 contentType === 'image/vnd.microsoft.icon'
125 );
126}
127function isSvgFile(url: string, contentType?: string): boolean {
128 return url.toLowerCase().endsWith('.svg') || contentType === 'image/svg+xml';
129}

Callers 2

processImageFunction · 0.85
getFaviconFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected