Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@restart/hooks

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/hooks - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"name": "@restart/hooks",
"version": "0.1.5",
"version": "0.1.6",
"main": "index.js",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

/// <reference types="react" />
declare function useCommittedRef<TValue>(value: TValue): React.RefObject<TValue>;
declare function useCommittedRef<TValue>(value: TValue): React.MutableRefObject<TValue>;
export default useCommittedRef;

@@ -14,3 +14,5 @@ "use strict";

const ref = (0, _useCommittedRef.default)(fn);
return (0, _react.useCallback)((...args) => ref.current(...args), [ref]);
return (0, _react.useCallback)(function (...args) {
return ref.current(...args);
}, [ref]);
}

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

export default function useGlobalListener(event: string, listener: EventListener, capture?: boolean): void;
declare type DocumentEventHandler<K extends keyof DocumentEventMap> = (this: Document, ev: DocumentEventMap[K]) => any;
export default function useGlobalListener<K extends keyof DocumentEventMap>(event: K, listener: DocumentEventHandler<K>, capture?: boolean): void;
export {};
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