Socket
Socket
Sign inDemoInstall

react-keybindings

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-keybindings - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

lib/components/mapActionsToKeys.js

@@ -145,3 +145,3 @@ "use strict";

},
keyActions: (0, _keyActions2.default)(this.state.pressedKeys)
keyActions: (0, _keyActions2.default)(keymap, this.state.pressedKeys)
}, this.state, this.props));

@@ -148,0 +148,0 @@ }

@@ -10,3 +10,3 @@ "use strict";

exports.default = function (pressedKeys) {
exports.default = function (keymap, pressedKeys) {
if (pressedKeys.length > 0) {

@@ -13,0 +13,0 @@ return Object.keys(keymap).filter(function (action) {

{
"name": "react-keybindings",
"version": "1.0.4",
"version": "1.0.5",
"description": "Add keybindings in React apps",

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

@@ -97,3 +97,3 @@ import React, { Component } from "react"

ref={ (wrapped) => this.wrapped = wrapped }
keyActions={ keyActions(this.state.pressedKeys) }
keyActions={ keyActions(keymap, this.state.pressedKeys) }
{ ...this.state }

@@ -100,0 +100,0 @@ { ...this.props } />

/**
* Watch the pressed keys and return related actions
*/
export default (pressedKeys) => {
export default (keymap, pressedKeys) => {
if (pressedKeys.length > 0) {

@@ -6,0 +6,0 @@ return Object.keys(keymap).filter((action) => {

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