Comparing version 0.0.24 to 0.0.25
@@ -1068,3 +1068,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
async process(html) { | ||
const start = process.hrtime.bigint(); | ||
const start = Date.now(); | ||
@@ -1092,4 +1092,4 @@ // Parse the generated HTML in a DOM we can mutate | ||
const output = serializeDocument(document); | ||
const end = process.hrtime.bigint(); | ||
this.logger.info('Time ' + parseFloat(end - start) / 1000000.0); | ||
const end = Date.now(); | ||
this.logger.info(`Time ${end - start}ms`); | ||
return output; | ||
@@ -1102,3 +1102,3 @@ } | ||
getAffectedStyleTags(document) { | ||
const styles = [].slice.call(document.querySelectorAll('style')); | ||
const styles = [...document.querySelectorAll('style')]; | ||
@@ -1105,0 +1105,0 @@ // `inline:false` skips processing of inline stylesheets |
{ | ||
"name": "critters", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "Inline critical CSS and lazy-load the rest.", | ||
@@ -5,0 +5,0 @@ "main": "dist/critters.js", |
@@ -161,3 +161,3 @@ /** | ||
async process(html) { | ||
const start = process.hrtime.bigint(); | ||
const start = Date.now(); | ||
@@ -195,4 +195,4 @@ // Parse the generated HTML in a DOM we can mutate | ||
const output = serializeDocument(document); | ||
const end = process.hrtime.bigint(); | ||
this.logger.info('Time ' + parseFloat(end - start) / 1000000.0); | ||
const end = Date.now(); | ||
this.logger.info(`Time ${end - start}ms`); | ||
return output; | ||
@@ -205,3 +205,3 @@ } | ||
getAffectedStyleTags(document) { | ||
const styles = [].slice.call(document.querySelectorAll('style')); | ||
const styles = [...document.querySelectorAll('style')]; | ||
@@ -208,0 +208,0 @@ // `inline:false` skips processing of inline stylesheets |
Sorry, the diff of this file is not supported yet
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
165978