UNPKG

perf-marks

Version:

The simplest and lightweight solution for User Timing API in Javascript.

17 lines (16 loc) 601 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Boolean with the result of the check if User Timing API * is supported for the current browser/NodeJS version * * @returns boolean * */ var isUserTimingAPISupported = typeof performance !== 'undefined' && typeof performance.now !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; exports.isUserTimingAPISupported = isUserTimingAPISupported;