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

glideapps / glide-data-grid / 7349796385

28 Dec 2023 05:17PM UTC coverage: 90.704% (+4.3%) from 86.42%
7349796385

Pull #810

github

jassmith
Add missing exports
Pull Request #810: 6.0.0

2626 of 3266 branches covered (0.0%)

3874 of 4387 new or added lines in 63 files covered. (88.31%)

256 existing lines in 12 files now uncovered.

15933 of 17566 relevant lines covered (90.7%)

3056.88 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,685✔
10
    }
1,685✔
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