electron-is-snap

1.0.3 • Public • Published




Site | NPM Module | GitHub Repo

Electron is Snap is an NPM module for Electron developers that helps you check if your project is running as a Linux Snap app.

Install

Install with npm:

npm install electron-is-snap

Features

  • Check if your app is running in a Linux Snap environment
  • Works in the main process and the renderer process
  • Should work for non-Electron projects too

Example Setup

After installing via npm, simply require the library and begin enjoying this simple tool 🧰.

// In your main.js or renderer.js file
const isSnap = require('electron-is-snap').isSnap;

// Output: boolean

Final Words

If you are still having difficulty, we would love for you to post a question to the Electron is Snap issues page. It is much easier to answer questions that include your code and relevant files! So if you can provide them, we'd be extremely grateful (and more likely to help you find the answer!)

A special thanks to electron-is-packaged for inspiring electron-is-snap and providing a structure for Electron apps checking if they are running in Snap.

Projects Using this Library

Somiibo: A Social Media Bot with an open-source module library.
JekyllUp: A website devoted to sharing the best Jekyll themes.
Slapform: A backend processor for your HTML forms on static sites.
Sniips: A modern, hackable snippet manager
Proxifly: An API to get free proxies for your services.
Optiic: A free OCR image processing API.
SoundGrail Music App: A resource for producers, musicians, and DJs.

Ask us to have your project listed! :)

Other Great Libraries

node-powertools: An NPM module for backend and frontend developers that exposes powerful utilities and tools.
optiic: An OCR image processing API.
proxifly: An API to find proxies for your apps.
slapform: A form backend API.

Package Sidebar

Install

npm i electron-is-snap

Weekly Downloads

7

Version

1.0.3

License

MIT

Unpacked Size

6.02 kB

Total Files

4

Last publish

Collaborators

  • itwcw2000