Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

JB1905/check-is-pwa

Repository files navigation

NPM version NPM downloads NPM license All Contributors Codecov Travis Bundle size

About ℹ️

Check if the application is running as a PWA

Alternatives

How to Install 💾

First, install the library in your project by npm:

$ npm install check-is-pwa

Or Yarn:

$ yarn add check-is-pwa

Getting Started 🏁

Connect the library to the project with ES6 import:

import checkIsPwa from 'check-is-pwa';

Or CommonJS:

const checkIsPwa = require('check-is-pwa');

Next use library:

const status = checkIsPwa();

Example 🧪

//the app is running as a PWA

checkIsPwa(); // true
// the app is NOT running as a PWA / is running in the SSR

checkIsPwa(); // false

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Jakub Biesiada

💻 ⚠️ 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

License 🔱

This project is licensed under the MIT License © 2020-present Jakub Biesiada