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 2.5.0 to 2.6.0

es/useCountDown/index.d.ts

3

es/index.d.ts

@@ -52,3 +52,4 @@ import useRequest, { UseRequestProvider } from '@ahooksjs/use-request';

import useTimeout from './useTimeout';
import useCountDown from './useCountDown';
declare const useControlledValue: typeof useControllableValue;
export { useControlledValue, useControllableValue, useDynamicList, useVirtualList, useResponsive, useEventEmitter, useLocalStorageState, useSessionStorageState, useSize, configResponsive, useUpdateEffect, useUpdateLayoutEffect, useBoolean, useToggle, useDocumentVisibility, useSelections, useThrottle, useThrottleFn, useThrottleEffect, useDebounce, useDebounceFn, useDebounceEffect, usePrevious, useMouse, useScroll, useClickAway, useFullscreen, useInViewport, useKeyPress, useEventListener, useHover, useRequest, UseRequestProvider, useAntdTable, useUnmount, useSet, usePersistFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useFusionTable, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, };
export { useControlledValue, useControllableValue, useDynamicList, useVirtualList, useResponsive, useEventEmitter, useLocalStorageState, useSessionStorageState, useSize, configResponsive, useUpdateEffect, useUpdateLayoutEffect, useBoolean, useToggle, useDocumentVisibility, useSelections, useThrottle, useThrottleFn, useThrottleEffect, useDebounce, useDebounceFn, useDebounceEffect, usePrevious, useMouse, useScroll, useClickAway, useFullscreen, useInViewport, useKeyPress, useEventListener, useHover, useRequest, UseRequestProvider, useAntdTable, useUnmount, useSet, usePersistFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useFusionTable, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useCountDown, };

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

import useTimeout from './useTimeout';
import useCountDown from './useCountDown';

@@ -100,2 +101,2 @@ var useControlledValue = function useControlledValue() {

export { useControlledValue, useControllableValue, useDynamicList, useVirtualList, useResponsive, useEventEmitter, useLocalStorageState, useSessionStorageState, useSize, configResponsive, useUpdateEffect, useUpdateLayoutEffect, useBoolean, useToggle, useDocumentVisibility, useSelections, useThrottle, useThrottleFn, useThrottleEffect, useDebounce, useDebounceFn, useDebounceEffect, usePrevious, useMouse, useScroll, useClickAway, useFullscreen, useInViewport, useKeyPress, useEventListener, useHover, useRequest, UseRequestProvider, useAntdTable, useUnmount, useSet, usePersistFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useFusionTable, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout };
export { useControlledValue, useControllableValue, useDynamicList, useVirtualList, useResponsive, useEventEmitter, useLocalStorageState, useSessionStorageState, useSize, configResponsive, useUpdateEffect, useUpdateLayoutEffect, useBoolean, useToggle, useDocumentVisibility, useSelections, useThrottle, useThrottleFn, useThrottleEffect, useDebounce, useDebounceFn, useDebounceEffect, usePrevious, useMouse, useScroll, useClickAway, useFullscreen, useInViewport, useKeyPress, useEventListener, useHover, useRequest, UseRequestProvider, useAntdTable, useUnmount, useSet, usePersistFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useFusionTable, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useCountDown };

@@ -12,8 +12,6 @@ import { useEffect, useCallback } from 'react';

var targets = Array.isArray(target) ? target : [target];
var targetElements = targets.map(function (targetItem) {
return getTargetElement(targetItem);
});
if (targetElements.some(function (targetElement) {
return !targetElement || targetElement.contains(event.target);
if (targets.some(function (targetItem) {
var targetElement = getTargetElement(targetItem);
return !targetElement || (targetElement === null || targetElement === void 0 ? void 0 : targetElement.contains(event.target));
})) {

@@ -20,0 +18,0 @@ return;

@@ -12,4 +12,6 @@ import { useEffect, useRef } from 'react';

var titleRef = useRef(document.title);
document.title = title;
useEffect(function () {
document.title = title;
}, [title]);
useEffect(function () {
if (options && options.restoreOnUnmount) {

@@ -16,0 +18,0 @@ return function () {

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

};
}, [setState]);
}, []);
return [state, actions];

@@ -74,0 +74,0 @@ }

@@ -52,3 +52,4 @@ import useRequest, { UseRequestProvider } from '@ahooksjs/use-request';

import useTimeout from './useTimeout';
import useCountDown from './useCountDown';
declare const useControlledValue: typeof useControllableValue;
export { useControlledValue, useControllableValue, useDynamicList, useVirtualList, useResponsive, useEventEmitter, useLocalStorageState, useSessionStorageState, useSize, configResponsive, useUpdateEffect, useUpdateLayoutEffect, useBoolean, useToggle, useDocumentVisibility, useSelections, useThrottle, useThrottleFn, useThrottleEffect, useDebounce, useDebounceFn, useDebounceEffect, usePrevious, useMouse, useScroll, useClickAway, useFullscreen, useInViewport, useKeyPress, useEventListener, useHover, useRequest, UseRequestProvider, useAntdTable, useUnmount, useSet, usePersistFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useFusionTable, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, };
export { useControlledValue, useControllableValue, useDynamicList, useVirtualList, useResponsive, useEventEmitter, useLocalStorageState, useSessionStorageState, useSize, configResponsive, useUpdateEffect, useUpdateLayoutEffect, useBoolean, useToggle, useDocumentVisibility, useSelections, useThrottle, useThrottleFn, useThrottleEffect, useDebounce, useDebounceFn, useDebounceEffect, usePrevious, useMouse, useScroll, useClickAway, useFullscreen, useInViewport, useKeyPress, useEventListener, useHover, useRequest, UseRequestProvider, useAntdTable, useUnmount, useSet, usePersistFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useFusionTable, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useCountDown, };

@@ -81,3 +81,3 @@ "use strict";

});
exports.useTimeout = exports.useNetwork = exports.useTitle = exports.useWhyDidYouUpdate = exports.useInterval = exports.useSetState = exports.useCookieState = exports.useFusionTable = exports.useHistoryTravel = exports.useEventTarget = exports.useTextSelection = exports.useUpdate = exports.useCounter = exports.useMount = exports.useDrop = exports.useDrag = exports.useCreation = exports.useMap = exports.usePersistFn = exports.useSet = exports.useUnmount = exports.useAntdTable = exports.UseRequestProvider = exports.useRequest = exports.useHover = exports.useEventListener = exports.useKeyPress = exports.useInViewport = exports.useFullscreen = exports.useClickAway = exports.useScroll = exports.useMouse = exports.usePrevious = exports.useDebounceEffect = exports.useDebounceFn = exports.useDebounce = exports.useThrottleEffect = exports.useThrottleFn = exports.useThrottle = exports.useSelections = exports.useDocumentVisibility = exports.useToggle = exports.useBoolean = exports.useUpdateLayoutEffect = exports.useUpdateEffect = exports.configResponsive = exports.useSize = exports.useSessionStorageState = exports.useLocalStorageState = exports.useEventEmitter = exports.useResponsive = exports.useVirtualList = exports.useDynamicList = exports.useControllableValue = exports.useControlledValue = void 0;
exports.useCountDown = exports.useTimeout = exports.useNetwork = exports.useTitle = exports.useWhyDidYouUpdate = exports.useInterval = exports.useSetState = exports.useCookieState = exports.useFusionTable = exports.useHistoryTravel = exports.useEventTarget = exports.useTextSelection = exports.useUpdate = exports.useCounter = exports.useMount = exports.useDrop = exports.useDrag = exports.useCreation = exports.useMap = exports.usePersistFn = exports.useSet = exports.useUnmount = exports.useAntdTable = exports.UseRequestProvider = exports.useRequest = exports.useHover = exports.useEventListener = exports.useKeyPress = exports.useInViewport = exports.useFullscreen = exports.useClickAway = exports.useScroll = exports.useMouse = exports.usePrevious = exports.useDebounceEffect = exports.useDebounceFn = exports.useDebounce = exports.useThrottleEffect = exports.useThrottleFn = exports.useThrottle = exports.useSelections = exports.useDocumentVisibility = exports.useToggle = exports.useBoolean = exports.useUpdateLayoutEffect = exports.useUpdateEffect = exports.configResponsive = exports.useSize = exports.useSessionStorageState = exports.useLocalStorageState = exports.useEventEmitter = exports.useResponsive = exports.useVirtualList = exports.useDynamicList = exports.useControllableValue = exports.useControlledValue = void 0;

@@ -316,2 +316,6 @@ var use_request_1 = __importStar(require("@ahooksjs/use-request"));

var useCountDown_1 = __importDefault(require("./useCountDown"));
exports.useCountDown = useCountDown_1["default"];
var useControlledValue = function useControlledValue() {

@@ -318,0 +322,0 @@ var args = [];

@@ -21,8 +21,6 @@ "use strict";

var targets = Array.isArray(target) ? target : [target];
var targetElements = targets.map(function (targetItem) {
return dom_1.getTargetElement(targetItem);
});
if (targetElements.some(function (targetElement) {
return !targetElement || targetElement.contains(event.target);
if (targets.some(function (targetItem) {
var targetElement = dom_1.getTargetElement(targetItem);
return !targetElement || (targetElement === null || targetElement === void 0 ? void 0 : targetElement.contains(event.target));
})) {

@@ -29,0 +27,0 @@ return;

@@ -19,4 +19,6 @@ "use strict";

var titleRef = react_1.useRef(document.title);
document.title = title;
react_1.useEffect(function () {
document.title = title;
}, [title]);
react_1.useEffect(function () {
if (options && options.restoreOnUnmount) {

@@ -23,0 +25,0 @@ return function () {

@@ -77,3 +77,3 @@ "use strict";

};
}, [setState]);
}, []);
return [state, actions];

@@ -80,0 +80,0 @@ }

{
"name": "ahooks",
"version": "2.5.0",
"version": "2.6.0",
"description": "react hooks library",

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

"dependencies": {
"@ahooksjs/use-request": "^2.3.0",
"@ahooksjs/use-request": "^2.6.0",
"@types/js-cookie": "^2.2.6",

@@ -38,0 +38,0 @@ "intersection-observer": "^0.7.0",

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