Socket
Socket
Sign inDemoInstall

@reecelucas/react-use-hotkeys

Package Overview
Dependencies
4
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 1.3.2

5

esm/helpers/getHotkeysArray.js

@@ -8,4 +8,5 @@ export default (function (hotkeys) {

if (hkeys.includes('+')) {
// We're dealing with a modifier-key combination
return hkeys.replace(/\s+/g, '').split('+');
// We're dealing with a modifier-key combination. The `/(?<!\+)\+/` regex
// matches a single `+`, allowing combinations including `+`, E.g. `Shift++`.
return hkeys.replace(/\s+/g, '').split(/(?<!\+)\+/);
}

@@ -12,0 +13,0 @@ /**

@@ -10,4 +10,5 @@ "use strict";

if (hkeys.includes('+')) {
// We're dealing with a modifier-key combination
return hkeys.replace(/\s+/g, '').split('+');
// We're dealing with a modifier-key combination. The `/(?<!\+)\+/` regex
// matches a single `+`, allowing combinations including `+`, E.g. `Shift++`.
return hkeys.replace(/\s+/g, '').split(/(?<!\+)\+/);
}

@@ -14,0 +15,0 @@ /**

2

package.json
{
"name": "@reecelucas/react-use-hotkeys",
"version": "1.3.1",
"version": "1.3.2",
"description": "React hook to create keyboard shortcuts",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc