Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

detect-app-store

roryok23ISC1.0.1

Check if your JS code is packaged as a Linux Snap or Windows Store application

electron, path, snap, linux, windows, windows-store, is-snap, is-windows-store, is-windows

readme

About

Detect App Store is a small JS library for detecting if your code is running inside an app store environment such as Linux Snap or Windows Store. This is useful for instance in electron apps, if you want certain functions to operate only within certain environments.

Detect App Store is based on electron-is-snap.

Install

Install with npm:

npm install detect-app-store

Features

  • Check if your app is running in a Linux Snap environment
  • Check if your app is running in a Windows Store environment

Example Setup

After installing via npm, require or import the detect-app-store.

// using require
var isSnap = require('detect-app-store').isSnap;
var isWindowsStore = require('detect-app-store').isWindowsStore;
// using import
import { isSnap, isWindowsStore } from 'detect-app-store';