electron-is-snap
v1.0.5
Published
Check if the Electron app is packaged as a Linux snap application
Downloads
105
Maintainers
Readme
📦 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.
📚 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.