@tinkoff/browser-timings
Advanced tools
Comparing version 0.9.5 to 0.9.6
@@ -56,6 +56,12 @@ const toSecond = (timeStamp) => Math.round(timeStamp) / 1000; | ||
if (entries && entries.length > 0) { | ||
const countByType = {}; | ||
entries.forEach((entry) => { | ||
const name = getType(entry.name.split('?', 1)[0]); | ||
if (resourceType[name]) { | ||
if (!countByType[name]) { | ||
countByType[name] = 0; | ||
} | ||
countByType[name]++; | ||
result[name] = calculateMetric(result[name], entry); | ||
result[name].count = countByType[name]; | ||
} | ||
@@ -62,0 +68,0 @@ }); |
@@ -60,6 +60,12 @@ 'use strict'; | ||
if (entries && entries.length > 0) { | ||
const countByType = {}; | ||
entries.forEach((entry) => { | ||
const name = getType(entry.name.split('?', 1)[0]); | ||
if (resourceType[name]) { | ||
if (!countByType[name]) { | ||
countByType[name] = 0; | ||
} | ||
countByType[name]++; | ||
result[name] = calculateMetric(result[name], entry); | ||
result[name].count = countByType[name]; | ||
} | ||
@@ -66,0 +72,0 @@ }); |
{ | ||
"name": "@tinkoff/browser-timings", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"initialVersion": "0.8.18", | ||
@@ -5,0 +5,0 @@ "description": "Lightweighted browser timings metrics exporter", |
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
12701
306