Skip to content

Commit 3d860d3

Browse files
author
Sergei Orlov
committed
docs(readme): update documentation
1 parent a406395 commit 3d860d3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ const isChrome = (x: Navigator): boolean => "vendor" in x && /Google Inc/.test(x
6262
const isIe = (x: Navigator): boolean => /Trident/.test(x.userAgent);
6363

6464
export const getCurrentBrowser = (navigator: Navigator): TBrowser =>
65-
Switch<Navigator, TBrowser>(navigator)
66-
.case(isEdge, "edge")
67-
.case(isChrome, "chrome")
68-
.case(isIe, "ie")
69-
.default("firefox");
65+
Switch(navigator)
66+
.case(isEdge, "edge" as const)
67+
.case(isChrome, "chrome" as const)
68+
.case(isIe, "ie" as const)
69+
.default("firefox" as const);
7070

7171
const browser = getCurrentBrowser(navigator);
7272
```

0 commit comments

Comments
 (0)