Skip to content

hemanth/is-pwa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-pwa

Checks if a given URL is a PWA.

Install

$ npm install --save is-pwa

Usage

const isPwa = require('is-pwa');

isPwa(<URL>)
  .then(score => {
    if(score>75) {
      console.log(`It is a PWA! With a lighthouse score of: ${score}`);
    } else {
      console.error('Sorry, it\'s not a PWA :(');
    }
  })

API

isPwa(input)

input

Type: string

URL of the PWA.

CLI

$ npm install --global is-pwa
$ is-pwa 

  Checks if a given URL is a PWA.

  Usage

  Make sure you have ran `npm explore -g lighthouse -- npm run chrome&`

    $ is-pwa [input]

  Examples
    $ is-pwa https://jsfeatures.in
     It is a PWA! With a lighthouse score of: 80
  
    $ is-pwa https://h3manth.com
     Sorry, it's not a PWA :(

License

MIT © Hemanth.HM

About

Detects if a given URL is a Progressive WebApp (PWA.)

Resources

License

Stars

Watchers

Forks

Packages

No packages published