New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-hook/throttle

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hook/throttle - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

6

dist/main/index.js

@@ -36,6 +36,8 @@ 'use strict'

return useCallback(
function (...args) {
function () {
// eslint-disable-next-line @typescript-eslint/no-this-alias
const self = this
const self = this // eslint-disable-next-line prefer-rest-params
const args = arguments
function _ref2() {

@@ -42,0 +44,0 @@ nextTimeout.current = null

@@ -25,6 +25,8 @@ import React from 'react'

return useCallback(
function (...args) {
function () {
// eslint-disable-next-line @typescript-eslint/no-this-alias
const self = this
const self = this // eslint-disable-next-line prefer-rest-params
const args = arguments
function _ref2() {

@@ -31,0 +33,0 @@ nextTimeout.current = null

{
"name": "@react-hook/throttle",
"version": "2.0.2",
"version": "2.1.0",
"homepage": "https://github.com/jaredLunde/react-hook/tree/master/packages/throttle#readme",

@@ -5,0 +5,0 @@ "repository": "github:jaredLunde/react-hook",

@@ -80,7 +80,7 @@ <hr>

```ts
export const useThrottleCallback = <CallbackArgs extends any[]>(
callback: (...args: CallbackArgs) => any,
export const useThrottleCallback = <Callback extends (...args: any[]) => void>(
callback: Callback,
fps = 30,
leading = false
): ((...args: CallbackArgs) => void)
): Callback
```

@@ -87,0 +87,0 @@

import {Dispatch, SetStateAction} from 'react'
export declare const useThrottleCallback: <CallbackArgs extends any[]>(
callback: (...args: CallbackArgs) => any,
export declare const useThrottleCallback: <CallbackArguments extends any[]>(
callback: (...args: CallbackArguments) => void,
fps?: number,
leading?: boolean
) => (...args: CallbackArgs) => void
) => (...args: CallbackArguments) => void
export declare const useThrottle: <State>(

@@ -8,0 +8,0 @@ initialState: State | (() => State),

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