How to use the calibre.Site.list function in calibre

To help you get started, we’ve selected a few calibre examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github calibreapp / cli / examples / nodejs / get-all-pulse-metrics.js View on Github external
const main = async () => {
  const sites = await Site.list()

  const to = new Date()

  const from = new Date()
  from.setDate(to.getDate() - 7)

  console.log(`=== ${sites.length} sites`)

  const metrics = await Promise.all(
    sites.map(({ slug }) => {
      return TimeSeries.list({
        site: slug,
        from: from.toUTCString(),
        to: to.toUTCString(),
        measurements: ['consistently-interactive']
      })

calibre

Calibre - Page speed performance testing with Google Lighthouse

MIT
Latest version published 2 months ago

Package Health Score

84 / 100
Full package analysis