released v3.13.3 #466

pull/469/head v3.13.3
jaywcjlove 1 year ago
parent 478ee66989
commit c96985c060

@ -1,5 +1,5 @@
/**!
* hotkeys-js v3.13.1
* hotkeys-js v3.13.3
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
@ -498,6 +498,9 @@ function hotkeys(key, option, method) {
}
if (typeof option === 'string') scope = option;
// 如果只允许单个callback先unbind
if (single) unbind(key, scope);
// 对于每个快捷键进行处理
for (; i < keys.length; i++) {
key = keys[i].split(splitKey); // 按键列表
@ -512,8 +515,6 @@ function hotkeys(key, option, method) {
// 判断key是否在_handlers中不在就赋一个空数组
if (!(key in _handlers)) _handlers[key] = [];
// 如果只允许单个callback重新设置_handlers
if (single) _handlers[key] = [];
_handlers[key].push({
keyup,
keydown,

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/**!
* hotkeys-js v3.13.1
* hotkeys-js v3.13.3
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
@ -496,6 +496,9 @@ function hotkeys(key, option, method) {
}
if (typeof option === 'string') scope = option;
// 如果只允许单个callback先unbind
if (single) unbind(key, scope);
// 对于每个快捷键进行处理
for (; i < keys.length; i++) {
key = keys[i].split(splitKey); // 按键列表
@ -510,8 +513,6 @@ function hotkeys(key, option, method) {
// 判断key是否在_handlers中不在就赋一个空数组
if (!(key in _handlers)) _handlers[key] = [];
// 如果只允许单个callback重新设置_handlers
if (single) _handlers[key] = [];
_handlers[key].push({
keyup,
keydown,

7
dist/hotkeys.js vendored

@ -1,5 +1,5 @@
/**!
* hotkeys-js v3.13.1
* hotkeys-js v3.13.3
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
@ -502,6 +502,9 @@
}
if (typeof option === 'string') scope = option;
// 如果只允许单个callback先unbind
if (single) unbind(key, scope);
// 对于每个快捷键进行处理
for (; i < keys.length; i++) {
key = keys[i].split(splitKey); // 按键列表
@ -516,8 +519,6 @@
// 判断key是否在_handlers中不在就赋一个空数组
if (!(key in _handlers)) _handlers[key] = [];
// 如果只允许单个callback重新设置_handlers
if (single) _handlers[key] = [];
_handlers[key].push({
keyup,
keydown,

File diff suppressed because one or more lines are too long

4
package-lock.json generated

@ -1,12 +1,12 @@
{
"name": "hotkeys-js",
"version": "3.13.1",
"version": "3.13.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hotkeys-js",
"version": "3.13.1",
"version": "3.13.3",
"license": "MIT",
"devDependencies": {
"@babel/eslint-parser": "^7.18.9",

@ -1,7 +1,7 @@
{
"name": "hotkeys-js",
"description": "A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.",
"version": "3.13.2",
"version": "3.13.3",
"main": "index.js",
"types": "index.d.ts",
"module": "dist/hotkeys.esm.js",

Loading…
Cancel
Save