@vue/devtools-api
Advanced tools
Comparing version 6.1.0 to 6.1.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.now = void 0; | ||
exports.now = exports.isPerformanceSupported = void 0; | ||
let supported; | ||
let perf; | ||
function isSupported() { | ||
function isPerformanceSupported() { | ||
var _a; | ||
if (supported !== undefined) { | ||
@@ -14,2 +15,6 @@ return supported; | ||
} | ||
else if (typeof global !== 'undefined' && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { | ||
supported = true; | ||
perf = global.perf_hooks.performance; | ||
} | ||
else { | ||
@@ -20,5 +25,6 @@ supported = false; | ||
} | ||
exports.isPerformanceSupported = isPerformanceSupported; | ||
function now() { | ||
return isSupported() ? perf.now() : Date.now(); | ||
return isPerformanceSupported() ? perf.now() : Date.now(); | ||
} | ||
exports.now = now; |
@@ -0,1 +1,2 @@ | ||
export declare function isPerformanceSupported(): boolean; | ||
export declare function now(): number; |
let supported; | ||
let perf; | ||
function isSupported() { | ||
export function isPerformanceSupported() { | ||
var _a; | ||
if (supported !== undefined) { | ||
@@ -11,2 +12,6 @@ return supported; | ||
} | ||
else if (typeof global !== 'undefined' && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { | ||
supported = true; | ||
perf = global.perf_hooks.performance; | ||
} | ||
else { | ||
@@ -18,3 +23,3 @@ supported = false; | ||
export function now() { | ||
return isSupported() ? perf.now() : Date.now(); | ||
return isPerformanceSupported() ? perf.now() : Date.now(); | ||
} |
{ | ||
"name": "@vue/devtools-api", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "Interact with the Vue devtools from the page", | ||
@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32214
895