# is-standalone-pwa

> Detect if PWA is running in standalone mode

Latest version **0.1.1** (published 2024-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-standalone-pwa
pnpm add is-standalone-pwa
yarn add is-standalone-pwa
bun add is-standalone-pwa
```

## Health

**Score 45/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2024-11-07 |
| First published | 2024-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Faisal Salman |
| Maintainers | faisalman |
| Keywords | ua-parser-js, is-standalone-pwa, pwa |

## Links

- npm: https://www.npmjs.com/package/is-standalone-pwa
- Repository: https://github.com/faisalman/is-standalone-pwa
- Homepage: https://github.com/faisalman/is-standalone-pwa#readme
- Issues: https://github.com/faisalman/is-standalone-pwa/issues
- Funding: https://github.com/sponsors/faisalman
- npm.io page: https://npm.io/package/is-standalone-pwa

## Recent versions

- 0.1.1 (latest) — 2024-11-07
- 0.1.0 — 2024-11-05

## README

# isStandalonePWA

Detect if PWA is running in standalone mode (not in browser).

```sh
npm i is-standalone-pwa
```

## Methods

### * `isStandalonePWA(): boolean`

Returns `true` if detected as standalone, `false` otherwise.

## Code Example

```js
import { isStandalonePWA } from is-standalone-pwa;

if (isStandalonePWA()) {
    console.log('Hide download <button>!');
}
```

# License

MIT License

Copyright (c) 2024 Faisal Salman <<f@faisalman.com>>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
_Source: https://npm.io/package/is-standalone-pwa · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
