perf-marks
Version:
The simplest and lightweight solution for User Timing API in Javascript.
14 lines (13 loc) • 505 B
JavaScript
/**
* Boolean with the result of the check if PerformanceObservable
* is supported for the current browser/NodeJS version
*
* @returns boolean
*
*/
var isPerformanceObservableSupported = typeof PerformanceObserver !== 'undefined' &&
// eslint-disable-next-line compat/compat
typeof PerformanceObserver.prototype !== 'undefined' &&
// eslint-disable-next-line compat/compat
typeof PerformanceObserver.prototype.constructor === 'function';
export { isPerformanceObservableSupported };