Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Dead code: remove unused GetBrowserInfo() from browser-detect.ts #324

Description

@dobby-coder

Dead code: GetBrowserInfo() in src/lib/browser-detect.ts is never used

GetBrowserInfo() (src/lib/browser-detect.ts:3-49) is a ~45-line user-agent parser exported alongside isMobile on line 84, but it has no callers anywhere in the tree:

grep -rn "GetBrowserInfo" src tests
# src/lib/browser-detect.ts:3   (definition)
# src/lib/browser-detect.ts:84  (export)

isMobile from the same module is used widely (~20 references); only GetBrowserInfo is dead.

Fix

  • Delete the GetBrowserInfo function (src/lib/browser-detect.ts:3-49).
  • Change the export on line 84 from export { GetBrowserInfo, isMobile } to export { isMobile }.

No other changes needed. After the edit, run npm run check and npm run test:unit to confirm nothing broke.

Found during a scheduled code-quality audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions