Socket
Socket
Sign inDemoInstall

keyboardevents-areequal

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keyboardevents-areequal

Check if two keyboardevents objects are equals.


Version published
Weekly downloads
31K
increased by1.76%
Maintainers
1
Weekly downloads
 
Created
Source

keyboardevents-areequal

Travis Build Status NPM downloads

Check if two keyboardevents objects are equals.

This module is part of an ongoing effort to make electron-localshortcut less error prone, using keyboard DOM listener instead of 'globalShortcut' method to trigger shortcuts handlers.

Usage

This example check if various KeyboardEvent objects represents the same event:

const areEqual = require('keyboardevents-areequal');

console.log(areEqual({ctrlKey: true, code: 'f'}, {ctrlKey: true, code: 'f'}));
// true

console.log(areEqual({code: 'f'}, {ctrlKey: true, code: 'f'}));
// false

API

Install

With npm installed, run

npm install --save keyboardevents-areequal

See Also

License

MIT

FAQs

Package last updated on 07 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc