perf-deets
Advanced tools
Comparing version 1.0.15 to 1.0.17
@@ -88,4 +88,3 @@ import * as Plot from '@observablehq/plot'; | ||
let btn = document.createElement('button'); | ||
btn.textContent = 'open'; | ||
btn.textContent = 'display'; | ||
btn.addEventListener('click', e => { | ||
@@ -95,10 +94,18 @@ let r = document.querySelector('.perf-results .results'); | ||
r.style.display = 'flex'; | ||
e.target.textContent = 'close'; | ||
e.target.textContent = 'hide'; | ||
} else { | ||
r.style.display = 'none'; | ||
e.target.textContent = 'open'; | ||
e.target.textContent = 'display'; | ||
} | ||
}); | ||
btnDiv.appendChild(btn); | ||
btnDiv.appendChild(btn); | ||
let closebtn = document.createElement('button'); | ||
closebtn.textContent = 'close'; | ||
closebtn.addEventListener('click', e => { | ||
let c = document.querySelector('.perf-results'); | ||
c.remove() | ||
}); | ||
btnDiv.appendChild(closebtn); | ||
c.appendChild(btnDiv); | ||
@@ -152,3 +159,3 @@ | ||
text.appendChild( | ||
makeDataPoint('total', fixed(data.reduce((t, n) => t + n.y, 0), 3)) | ||
makeDataPoint('sum', fixed(data.reduce((t, n) => t + n.y, 0), 3)) | ||
); | ||
@@ -155,0 +162,0 @@ text.appendChild(makeDataPoint('count', data.length)); |
@@ -8,7 +8,5 @@ let buffer = 40000; | ||
if (process.env.NODE_ENV === 'production') { | ||
console.warning( | ||
'Warning: perf-deets loaded in production. This will cause unnecessary performance recordings' | ||
); | ||
} | ||
console.warn( | ||
'perf-deets loaded. If this is the production bundle, you should remove it' | ||
); | ||
@@ -15,0 +13,0 @@ function last(arr) { |
{ | ||
"name": "perf-deets", | ||
"version": "1.0.15", | ||
"version": "1.0.17", | ||
"main": "./index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
13076
5
357
1
51