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

@os-design/use-throttle

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@os-design/use-throttle - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

11

dist/cjs/index.js

@@ -7,6 +7,5 @@ "use strict";

exports["default"] = void 0;
var _react = require("react");
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-explicit-any */
var useThrottle = function useThrottle(callback, ms) {

@@ -23,4 +22,5 @@ var callbackRef = (0, _react.useRef)();

intervalRef.current = undefined;
}, []); // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// eslint-disable-next-line react-hooks/exhaustive-deps
var call = (0, _react.useCallback)(function () {

@@ -30,5 +30,3 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {

}
if (!callbackRef.current) return;
if (intervalRef.current) {

@@ -38,3 +36,2 @@ hasTrailingCallRef.current = true;

}
intervalRef.current = setInterval(function () {

@@ -45,3 +42,2 @@ if (!hasTrailingCallRef.current) {

}
hasTrailingCallRef.current = false;

@@ -55,5 +51,4 @@ if (!callbackRef.current) return;

};
var _default = useThrottle;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
import { useCallback, useEffect, useRef } from 'react';
/* eslint-disable @typescript-eslint/no-explicit-any */

@@ -15,7 +16,7 @@

intervalRef.current = undefined;
}, []); // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// eslint-disable-next-line react-hooks/exhaustive-deps
const call = useCallback((...args) => {
if (!callbackRef.current) return;
if (intervalRef.current) {

@@ -25,3 +26,2 @@ hasTrailingCallRef.current = true;

}
intervalRef.current = setInterval(() => {

@@ -32,3 +32,2 @@ if (!hasTrailingCallRef.current) {

}
hasTrailingCallRef.current = false;

@@ -42,4 +41,3 @@ if (!callbackRef.current) return;

};
export default useThrottle;
//# sourceMappingURL=index.js.map
{
"name": "@os-design/use-throttle",
"version": "1.0.11",
"version": "1.0.12",
"license": "UNLICENSED",

@@ -34,3 +34,3 @@ "repository": "git@gitlab.com:os-team/libs/os-design.git",

},
"gitHead": "8d32820f40f43f64be2bf85f60973d358be83c1d"
"gitHead": "8cb28f6719d699c014fbce91d832a9ff06abe515"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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