nanotiming
Advanced tools
Comparing version 7.2.0 to 7.3.0
@@ -5,6 +5,6 @@ var scheduler = require('nanoscheduler')() | ||
var perf | ||
var disabled = true | ||
nanotiming.disabled = true | ||
try { | ||
perf = window.performance | ||
disabled = window.localStorage.DISABLE_NANOTIMING === 'true' || !perf.mark | ||
nanotiming.disabled = window.localStorage.DISABLE_NANOTIMING === 'true' || !perf.mark | ||
} catch (e) { } | ||
@@ -17,3 +17,3 @@ | ||
if (disabled) return noop | ||
if (nanotiming.disabled) return noop | ||
@@ -20,0 +20,0 @@ var uuid = (perf.now() * 10000).toFixed() % Number.MAX_SAFE_INTEGER |
var assert = require('assert') | ||
var perf | ||
var disabled = true | ||
nanotiming.disabled = true | ||
try { | ||
perf = require('perf_hooks').performance | ||
disabled = process.env.DISABLE_NANOTIMING || !perf.mark | ||
nanotiming.disabled = process.env.DISABLE_NANOTIMING || !perf.mark | ||
} catch (e) { } | ||
@@ -17,3 +17,3 @@ | ||
if (disabled) return noop | ||
if (nanotiming.disabled) return noop | ||
@@ -20,0 +20,0 @@ var uuid = (perf.now() * 10000).toFixed() % Number.MAX_SAFE_INTEGER |
@@ -5,3 +5,3 @@ { | ||
"repository": "choojs/nanotiming", | ||
"version": "7.2.0", | ||
"version": "7.3.0", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "browser": "browser.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
7514