All Projects → delvedor → Electron Is

delvedor / Electron Is

Licence: mit
An 'is' utility for Electron which provides a set of handy functions, with a self-descriptive name.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Electron Is

Bnetlauncher
Launcher utility to help start battle.net games with the steam overlay.
Stars: ✭ 161 (-23.33%)
Mutual labels:  utility
Txeh
Go library and CLI utilty for /etc/hosts management.
Stars: ✭ 181 (-13.81%)
Mutual labels:  utility
Dot
Yet another management tool for dotfiles
Stars: ✭ 199 (-5.24%)
Mutual labels:  utility
Aspjson
A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks.
Stars: ✭ 165 (-21.43%)
Mutual labels:  utility
Hcl Picker
🎨 Colorpicker for data
Stars: ✭ 178 (-15.24%)
Mutual labels:  utility
Code Notes
Tool to summarise all code annotation like TODO or FIXME
Stars: ✭ 192 (-8.57%)
Mutual labels:  utility
Fselect
Find files with SQL-like queries
Stars: ✭ 3,103 (+1377.62%)
Mutual labels:  utility
Lxrunoffline
A full-featured utility for managing Windows Subsystem for Linux (WSL)
Stars: ✭ 3,005 (+1330.95%)
Mutual labels:  utility
Vue Breakpoints
🍬 🙈 Vue.js utility component to show and hide components based on breakpoints
Stars: ✭ 179 (-14.76%)
Mutual labels:  utility
Pudl
The Public Utility Data Liberation Project
Stars: ✭ 200 (-4.76%)
Mutual labels:  utility
Fastenum
The world fastest enum utilities for C#/.NET
Stars: ✭ 165 (-21.43%)
Mutual labels:  utility
Sdcv
Stars: ✭ 171 (-18.57%)
Mutual labels:  utility
Ts Toolbelt
ts-toolbelt is the largest, and most tested type library available right now, featuring +200 utilities. Our type collection packages some of the most advanced mapped types, conditional types, and recursive types on the market.
Stars: ✭ 3,099 (+1375.71%)
Mutual labels:  utility
Node Git Server
🎡 A configurable git server written in Node.js
Stars: ✭ 163 (-22.38%)
Mutual labels:  utility
Util
A collection of useful utility functions
Stars: ✭ 201 (-4.29%)
Mutual labels:  utility
Graphtage
A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.
Stars: ✭ 2,062 (+881.9%)
Mutual labels:  utility
Draxt
draxt.js – NodeList/jQuery-like package for File System (node.js)
Stars: ✭ 192 (-8.57%)
Mutual labels:  utility
Discord Image Downloader Go
A simple tool which downloads pictures posted in discord channels of your choice to a local folder.
Stars: ✭ 210 (+0%)
Mutual labels:  utility
Fwd
🚂 The little forwarder that could
Stars: ✭ 203 (-3.33%)
Mutual labels:  utility
Paco
Small utility library for coroutine-driven asynchronous generic programming in Python 3.4+
Stars: ✭ 198 (-5.71%)
Mutual labels:  utility

electron-is

js-standard-style Build Status

An 'is' utility for Electron.
electron-is provides a set of isomorphic 'is' APIs, that you can use it both in main and renderer process.
See usage for more information.

Install

$ npm install electron-is --save

API

  • is.renderer()
    Returns true if you are calling the function from the renderer process.

  • is.main()
    Returns true if you are calling the function from the main process.

  • is.macOS() aliases is.osx()
    Returns true if your app is running under Mac OS.

  • is.windows()
    Returns true if your app is running under Windows OS.

  • is.linux()
    Returns true if your app is running under Linux OS.

  • is.x86()
    Returns true if you the architecture of the processor is ia32.

  • is.x64()
    Returns true if you the architecture of the processor is x64.

  • is.production()
    Returns true if you are running the app in a production environment.

  • is.dev()
    Returns true if you are running the app in a dev environment.

  • is.sandbox() only macOS
    Returns true if you are running the app in a sandbox environment under macOS.

  • is.mas()
    Returns true if the app is running as a Mac App Store build.

  • is.windowsStore()
    Returns true if the app is running as a Windows Store (appx) build.

  • is.all(args)
    Returns true if all the 'is functions' passed as argument are true.
    example: is.all(is.osx, is.x64)

  • is.none(args)
    Returns true if all the 'is functions' passed as argument are false.
    example: is.none(is.windows, is.x86, is.main)

  • is.one(args)
    Returns true if one of the 'is functions' passed as argument is true.
    example: is.one(is.osx, is.linux)

  • is.release(args)
    Checks the if the given release is the same of the OS (*)
    example: is.release('10.0.10586')

  • is.gtRelease(args)
    Checks if the given release is greater than the current OS release (*)
    example: is.gtRelease('10.9.5')

  • is.ltRelease(args)
    Checks if the given release is less than the current OS release (*)
    example: is.ltRelease('6.3')

The Mac versions are mapped as osx: darwin, you must pass the 9.x.y or 10.x.y OSX version as argument and not the darwin version.
If you are testing a Windows release you must pass the NT release, it can be x.y or x.y.build .

* Not implemented for Linux yet

Usage

  • In Main process:
// es6
import is from 'electron-is'
// es5
const is = require('electron-is')
console.log(is.main())
  • In Renderer process:
<script>
    const is = require('electron-is')
    console.log(is.renderer())
</script>

Acknowledgements

electron-is makes use of electron-is-dev package from @sindresorhus.

Contributing

If you feel you can help in any way, be it with examples, extra testing, or new features please open a pull request or open an issue.

The code follows the Standard code style.
js-standard-style


License

MIT

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 non infringement. 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.

Copyright © 2016 Tomas Della Vedova

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].