1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var getWindow_1 = require("./dom/getWindow");
|
4 | var isMacResult;
|
5 | /**
|
6 | * Returns true if the user is on a Mac. Caches the result value.
|
7 | * @param reset - Reset the cached result value (mainly for testing).
|
8 | */
|
9 | function isMac(reset) {
|
10 | if (typeof isMacResult === 'undefined' || reset) {
|
11 | var win = getWindow_1.getWindow();
|
12 | var userAgent = win && win.navigator.userAgent;
|
13 | isMacResult = !!userAgent && userAgent.indexOf('Macintosh') !== -1;
|
14 | }
|
15 | return !!isMacResult;
|
16 | }
|
17 | exports.isMac = isMac;
|
18 | //# sourceMappingURL=osDetector.js.map |
\ | No newline at end of file |