All files / src/components/utils constants.ts

100% Statements 10/10
62.5% Branches 5/8
100% Functions 0/0
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1719x 19x 19x 19x 19x 19x 19x     19x         19x 19x  
export const SECOND = 1000;
export const MINUTE = 60 * SECOND;
export const HOUR = 60 * MINUTE;
export const DAY = 24 * HOUR;
export const WEEK = 7 * DAY;
export const MONTH = 30 * DAY;
export const YEAR = 365 * DAY;
 
const platform =
    typeof window !== 'undefined' && window.navigator
        ? // @ts-expect-error
          window.navigator['userAgentData']?.platform || window.navigator.platform
        : '';
 
export const isMac = /^Mac/i.test(platform);
export const CtrlCmd = isMac ? 'metaKey' : 'ctrlKey';