New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

psi-local

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

psi-local

Tool for ability to use Google PageSpeed Insights locally

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

psi-local

Use PageSpeed Insights locally!

Using

  • npm install psi-local --save-dev
  • run your application locally (e.g. http://localhost:3000)
  • create .js file and require module:
      const psi = require('psi-local');
    
      psi(3000)
        .then(data => {
          // do something with results ...
        });
    
  • run node <your-file>.js

Additional

Module contains the only function and returns Promise for more the best usability. You can easily use ES2017 syntax for working with psi-local as this promise is never rejected. If some errors occur, it will return object { err: Error }

  (async function() {
    const port = 3000;
    const stats = await psi(port);

    if (stats.err) return handleError(stats);
    return handleResults(stats);
  })()

MIT License

Fill free to use and contribute

Keywords

PageSpeed

FAQs

Package last updated on 30 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts