Socket
Socket
Sign inDemoInstall

react-hotkeys-hook

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hotkeys-hook - npm Package Compare versions

Comparing version 4.0.4-1 to 4.0.4-2

dist/index.js

0

dist/BoundHotkeysProxyProvider.d.ts

@@ -0,0 +0,0 @@ import { ReactNode } from 'react';

@@ -0,0 +0,0 @@ import { Hotkey } from './types';

@@ -0,0 +0,0 @@ import useHotkeys from './useHotkeys';

export declare function isHotkeyPressed(key: string | string[], splitKey?: string): boolean;
export declare function pushToCurrentlyPressedKeys(key: string | string[]): void;
export declare function removeFromCurrentlyPressedKeys(key: string | string[]): void;
import { Hotkey, Keys } from './types';
export declare function parseKeysHookInput(keys: Keys, splitKey?: string): string[];
export declare function parseHotkey(hotkey: string, combinationKey?: string): Hotkey;

@@ -0,0 +0,0 @@ import type { DependencyList } from 'react';

export default function useDeepEqualMemo<T>(value: T): T | undefined;

@@ -0,2 +1,3 @@

/// <reference types="react" />
import { HotkeyCallback, Keys, OptionsOrDependencyArray, RefType } from './types';
export default function useHotkeys<T extends HTMLElement>(keys: Keys, callback: HotkeyCallback, options?: OptionsOrDependencyArray, dependencies?: OptionsOrDependencyArray): import("react").MutableRefObject<RefType<T>>;

@@ -0,0 +0,0 @@ import { FormTags, Hotkey, Scopes, Trigger } from './types';

10

package.json
{
"name": "react-hotkeys-hook",
"version": "4.0.4-1",
"version": "4.0.4-2",
"repository": "https://JohannesKlauss@github.com/JohannesKlauss/react-keymap-hook.git",
"homepage": "https://johannesklauss.github.io/react-hotkeys-hook/",
"author": "Johannes Klauss",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"main": "dist/index.js",
"module": "dist/react-hotkeys-hook.esm.js",
"types": "dist/index.d.ts",

@@ -28,3 +28,3 @@ "files": [

"scripts": {
"build": "node ./esbuild.js && tsc --project tsconfig.build.json",
"build": "tsdx build",
"test": "jest",

@@ -61,3 +61,2 @@ "publish": "np"

"@types/react-dom": "18.0.6",
"esbuild": "0.15.13",
"eslint-plugin-prettier": "4.2.1",

@@ -70,2 +69,3 @@ "jest": "29.2.2",

"react-test-renderer": "18.2.0",
"tsdx": "0.14.1",
"tslib": "2.4.0",

@@ -72,0 +72,0 @@ "typescript": "4.7.4"

@@ -1,3 +0,3 @@

import { HotkeyCallback, Keys, OptionsOrDependencyArray, RefType } from './types'
import { useCallback, useEffect, useLayoutEffect, useRef } from 'react'
import { HotkeyCallback, Keys, Options, OptionsOrDependencyArray, RefType } from './types'
import { DependencyList, useCallback, useEffect, useLayoutEffect, useRef } from 'react'
import { parseHotkey, parseKeysHookInput } from './parseHotkeys'

@@ -33,4 +33,4 @@ import {

const _options = !(options instanceof Array) ? options : !(dependencies instanceof Array) ? dependencies : undefined
const _deps = options instanceof Array ? options : dependencies instanceof Array ? dependencies : []
const _options: Options | undefined = !(options instanceof Array) ? (options as Options) : !(dependencies instanceof Array) ? (dependencies as Options) : undefined
const _deps: DependencyList = options instanceof Array ? options : dependencies instanceof Array ? dependencies : []

@@ -37,0 +37,0 @@ const cb = useCallback(callback, [..._deps])

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