Socket
Socket
Sign inDemoInstall

@github/hotkey

Package Overview
Dependencies
Maintainers
14
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/hotkey - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

22

dist/index.esm.js

@@ -59,3 +59,3 @@ function _classCallCheck(instance, Constructor) {

if (this.children.length === 0) {
this.parent.delete(this);
this.parent["delete"](this);
}

@@ -105,3 +105,3 @@

if (nextNode instanceof RadixTrie) {
currentNode.delete(nextNode);
currentNode["delete"](nextNode);
nextNode = null;

@@ -143,3 +143,3 @@ } // If nextNode doesn't exist (or used to be a RadixTrie) then make a Leaf:

if (Object.keys(this.children).length === 0 && this.parent) {
this.parent.delete(this);
this.parent["delete"](this);
}

@@ -257,3 +257,3 @@

}
function install(element, hotkey$$1) {
function install(element, hotkey) {
// Install the keydown handler if this is the first install

@@ -264,5 +264,5 @@ if (Object.keys(hotkeyRadixTrie.children).length === 0) {

var hotkeys = expandHotkeyToEdges(hotkey$$1 || element.getAttribute('data-hotkey') || '');
var leaves = hotkeys.map(function (hotkey$$1) {
return hotkeyRadixTrie.insert(hotkey$$1).add(element);
var hotkeys = expandHotkeyToEdges(hotkey || element.getAttribute('data-hotkey') || '');
var leaves = hotkeys.map(function (h) {
return hotkeyRadixTrie.insert(h).add(element);
});

@@ -282,3 +282,3 @@ elementsLeaves.set(element, leaves);

var leaf = _step.value;
leaf && leaf.delete(element);
leaf && leaf["delete"](element);
}

@@ -290,4 +290,4 @@ } catch (err) {

try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}

@@ -307,2 +307,2 @@ } finally {

export { RadixTrie, Leaf, hotkey as eventToHotkeyString, install, uninstall };
export { Leaf, RadixTrie, hotkey as eventToHotkeyString, install, uninstall };

@@ -65,3 +65,3 @@ (function (global, factory) {

if (this.children.length === 0) {
this.parent.delete(this);
this.parent["delete"](this);
}

@@ -111,3 +111,3 @@

if (nextNode instanceof RadixTrie) {
currentNode.delete(nextNode);
currentNode["delete"](nextNode);
nextNode = null;

@@ -149,3 +149,3 @@ } // If nextNode doesn't exist (or used to be a RadixTrie) then make a Leaf:

if (Object.keys(this.children).length === 0 && this.parent) {
this.parent.delete(this);
this.parent["delete"](this);
}

@@ -263,3 +263,3 @@

}
function install(element, hotkey$$1) {
function install(element, hotkey) {
// Install the keydown handler if this is the first install

@@ -270,5 +270,5 @@ if (Object.keys(hotkeyRadixTrie.children).length === 0) {

var hotkeys = expandHotkeyToEdges(hotkey$$1 || element.getAttribute('data-hotkey') || '');
var leaves = hotkeys.map(function (hotkey$$1) {
return hotkeyRadixTrie.insert(hotkey$$1).add(element);
var hotkeys = expandHotkeyToEdges(hotkey || element.getAttribute('data-hotkey') || '');
var leaves = hotkeys.map(function (h) {
return hotkeyRadixTrie.insert(h).add(element);
});

@@ -288,3 +288,3 @@ elementsLeaves.set(element, leaves);

var leaf = _step.value;
leaf && leaf.delete(element);
leaf && leaf["delete"](element);
}

@@ -296,4 +296,4 @@ } catch (err) {

try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}

@@ -313,4 +313,4 @@ } finally {

exports.Leaf = Leaf;
exports.RadixTrie = RadixTrie;
exports.Leaf = Leaf;
exports.eventToHotkeyString = hotkey;

@@ -317,0 +317,0 @@ exports.install = install;

{
"name": "@github/hotkey",
"version": "1.2.0",
"version": "1.2.1",
"description": "",

@@ -10,3 +10,3 @@ "main": "dist/index.umd.js",

"build": "rollup -c && cp src/index.js.flow dist/index.esm.js.flow && cp src/index.js.flow dist/index.umd.js.flow",
"lint": "github-lint && flow",
"lint": "github-lint",
"test": "karma start test/karma.config.js",

@@ -25,11 +25,11 @@ "clean": "rm -rf dist",

"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/preset-env": "^7.2.3",
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-flow": "^7.0.0",
"chai": "^4.2.0",
"eslint": "^5.12.0",
"eslint-plugin-github": "^1.7.3",
"flow-bin": "^0.90.0",
"karma": "^3.1.4",
"eslint": "^6.0.1",
"eslint-plugin-github": "^3.0.0",
"flow-bin": "^0.102.0",
"karma": "^4.1.0",
"karma-chai": "^0.1.0",

@@ -39,6 +39,9 @@ "karma-chrome-launcher": "^2.2.0",

"karma-mocha-reporter": "^2.2.5",
"mocha": "^5.2.0",
"rollup": "^1.1.0",
"rollup-plugin-babel": "^4.3.0"
}
"mocha": "^6.1.4",
"rollup": "^1.16.3",
"rollup-plugin-babel": "^4.3.3"
},
"eslintIgnore": [
"dist/"
]
}
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