MCPcopy Create free account
hub / github.com/baiwumm/react-admin / BroswerIconMap

Function BroswerIconMap

Xmw_web/src/utils/index.ts:286–303  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

284
285/** @description: 浏览器图标映射 */
286export const BroswerIconMap = (text: string): string | undefined => {
287 const iconMap: Record<string, string> = {
288 Chrome: 'logos:chrome',
289 Firefox: 'logos:firefox',
290 Safari: 'logos:safari',
291 Opera: 'logos:opera',
292 Edge: 'logos:microsoft-edge',
293 WebKit: 'logos:webkit',
294 Android: 'logos:android-icon',
295 };
296 for (let i = 0; i < keys(iconMap).length; i += 1) {
297 const item = keys(iconMap)[i];
298 if (startsWith(toLower(text), toLower(item))) {
299 return iconMap[item];
300 }
301 }
302 return undefined;
303};
304
305/** @description: 操作系统图标映射 */
306export const OsIconMap = (text: string): string | undefined => {

Callers 1

OperationLogFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected