MCPcopy Create free account
hub / github.com/dailydotdev/apps / checkIsBrowser

Function checkIsBrowser

packages/shared/src/lib/func.ts:156–157  ·  view source on GitHub ↗
(agent: UserAgent)

Source from the content-addressed store, hash-verified

154}
155
156export const checkIsBrowser = (agent: UserAgent): boolean =>
157 globalThis?.navigator?.userAgent?.includes(agent);
158
159export const checkIsChromeOnly = (): boolean =>
160 (checkIsBrowser(UserAgent.Chrome) || checkIsBrowser(UserAgent.CriOS)) &&

Callers 2

checkIsChromeOnlyFunction · 0.85
getCurrentBrowserNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected