perf-deets
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -30,2 +30,7 @@ import * as Plot from '@observablehq/plot'; | ||
function sanitizeName(name) { | ||
// Turn name into a valid CSS class | ||
return name.replace(/[^a-z0-9]/gi, '-'); | ||
} | ||
let loggedResults = []; | ||
@@ -200,3 +205,3 @@ let cleanupTimer; | ||
let svgCont = document.createElement('div'); | ||
svgCont.className = 'data ' + name; | ||
svgCont.className = 'data ' + sanitizeName(name); | ||
svgCont.dataset.dataName = name; | ||
@@ -244,3 +249,3 @@ svgCont.style.marginTop = '15px'; | ||
let existing = r.querySelector('.data.' + name); | ||
let existing = r.querySelector('.data.' + sanitizeName(name)); | ||
if (existing) { | ||
@@ -247,0 +252,0 @@ existing.parentNode.replaceChild(svgCont, existing); |
{ | ||
"name": "perf-deets", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"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
11391
352