Tumortisch-Dist/resources/app/node_modules/electron-is-accelerator
2021-06-15 16:00:08 +02:00
..
.jshintrc project files added 2021-06-15 16:00:08 +02:00
.npmignore project files added 2021-06-15 16:00:08 +02:00
.travis.yml project files added 2021-06-15 16:00:08 +02:00
index.js project files added 2021-06-15 16:00:08 +02:00
LICENSE project files added 2021-06-15 16:00:08 +02:00
package.json project files added 2021-06-15 16:00:08 +02:00
README.md project files added 2021-06-15 16:00:08 +02:00
test.js project files added 2021-06-15 16:00:08 +02:00

electron-is-accelerator

Check if a string is a valid Electron accelerator and return a boolean. This module can be used to validate user defined accelerators before using them with MenuItems.

Installation

$ npm install --save electron-is-accelerator

Usage

var isAccelerator = require("electron-is-accelerator");

isAccelerator("CommandOrControl+Shift+Z"); // true
isAccelerator("CommandOrControl+F9"); // true
isAccelerator("CommandOrContrl+F9"); // false
isAccelerator("A+Z"); // false

License

The MIT License (MIT) Copyright (c) 2016 Thomas Brouard