• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

glideapps / glide-data-grid / 7341561499

27 Dec 2023 08:10PM UTC coverage: 90.585% (+4.2%) from 86.42%
7341561499

Pull #810

github

jassmith
5.99.9-charlie2
Pull Request #810: 6.0.0

2594 of 3246 branches covered (0.0%)

3364 of 3832 new or added lines in 62 files covered. (87.79%)

265 existing lines in 12 files now uncovered.

15760 of 17398 relevant lines covered (90.59%)

3076.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.0
/packages/core/src/common/browser-detect.ts
1
class Lazy<T> {
1✔
2
    private fn: () => T;
1✔
3
    private val: T | undefined;
27✔
4
    constructor(fn: () => T) {
1✔
5
        this.fn = fn;
27✔
6
    }
27✔
7

1✔
8
    public get value() {
1✔
9
        return this.val ?? (this.val = this.fn());
1,593✔
10
    }
1,593✔
11
}
1✔
12

1✔
13
function lazy<T>(fn: () => T) {
27✔
14
    return new Lazy(fn);
27✔
15
}
27✔
16

1✔
17
// next.js apps don't have window available at import time, so this will fail if its not lazy.
1✔
18
export const browserIsFirefox = lazy(() => window.navigator.userAgent.includes("Firefox"));
1✔
19
export const browserIsSafari = lazy(
1✔
20
    () =>
1✔
21
        window.navigator.userAgent.includes("Mac OS") &&
3!
UNCOV
22
        window.navigator.userAgent.includes("Safari") &&
×
UNCOV
23
        !window.navigator.userAgent.includes("Chrome")
×
24
);
1✔
25
export const browserIsOSX = lazy(() => window.navigator.platform.toLowerCase().startsWith("mac"));
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc