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

ahooks

Package Overview
Dependencies
Maintainers
5
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ahooks - npm Package Compare versions

Comparing version 3.0.0-alpha.10 to 3.0.0-alpha.11

1

es/useWebSocket/index.d.ts

@@ -15,2 +15,3 @@ export declare enum ReadyState {

onError?: (event: WebSocketEventMap['error']) => void;
protocols?: string | string[];
}

@@ -17,0 +18,0 @@ export interface Result {

5

es/useWebSocket/index.js

@@ -55,3 +55,4 @@ var __read = this && this.__read || function (o, n) {

onMessage = options.onMessage,
onError = options.onError;
onError = options.onError,
protocols = options.protocols;
var onOpenRef = useLatest(onOpen);

@@ -99,3 +100,3 @@ var onCloseRef = useLatest(onClose);

websocketRef.current = new WebSocket(socketUrl);
websocketRef.current = new WebSocket(socketUrl, protocols);
setReadyState(ReadyState.Connecting);

@@ -102,0 +103,0 @@

@@ -15,2 +15,3 @@ export declare enum ReadyState {

onError?: (event: WebSocketEventMap['error']) => void;
protocols?: string | string[];
}

@@ -17,0 +18,0 @@ export interface Result {

@@ -72,3 +72,4 @@ "use strict";

onMessage = options.onMessage,
onError = options.onError;
onError = options.onError,
protocols = options.protocols;
var onOpenRef = useLatest_1["default"](onOpen);

@@ -116,3 +117,3 @@ var onCloseRef = useLatest_1["default"](onClose);

websocketRef.current = new WebSocket(socketUrl);
websocketRef.current = new WebSocket(socketUrl, protocols);
setReadyState(ReadyState.Connecting);

@@ -119,0 +120,0 @@

{
"name": "ahooks",
"version": "3.0.0-alpha.10",
"version": "3.0.0-alpha.11",
"description": "react hooks library",

@@ -62,3 +62,3 @@ "keywords": [

"license": "MIT",
"gitHead": "1b67bdb4bce0805df77420a69ed05d240d17e061"
"gitHead": "ea9155aa93535b17b254a8524ada1348c15d710b"
}

Sorry, the diff of this file is too big to display

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