mark-loader
Advanced tools
Comparing version 0.1.4 to 0.1.5
11
index.js
const path = require('path'); | ||
const markLoaderGlobal = (markName) => ( | ||
`; var __markLoaderGlobal = global || window || {}; ` | ||
); | ||
const startMark = (markName) => ( | ||
`;global.performance && global.performance.mark && global.performance.mark('${markName}_start');` | ||
`;__markLoaderGlobal.performance && __markLoaderGlobal.performance.mark && __markLoaderGlobal.performance.mark('${markName}_start'); ` | ||
); | ||
const endMark = (markName) => ( | ||
`;global.performance && global.performance.mark && global.performance.mark('${markName}_end');` | ||
`;__markLoaderGlobal.performance && __markLoaderGlobal.performance.mark && __markLoaderGlobal.performance.mark('${markName}_end'); ` | ||
); | ||
const measure = (markName) => ( | ||
`;global.performance && global.performance.measure && global.performance.measure('${markName}', '${markName}_start', '${markName}_end');` | ||
`;__markLoaderGlobal.performance && __markLoaderGlobal.performance.measure && __markLoaderGlobal.performance.measure('${markName}', '${markName}_start', '${markName}_end'); ` | ||
); | ||
@@ -21,2 +25,3 @@ | ||
return [ | ||
markLoaderGlobal(), | ||
startMark(markName), | ||
@@ -23,0 +28,0 @@ content, |
{ | ||
"name": "mark-loader", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Inspect module load time with performance.measure", | ||
@@ -5,0 +5,0 @@ "main": "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
2943
26