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.17 to 3.0.0-alpha.18

6

es/index.d.ts

@@ -25,2 +25,3 @@ import useAntdTable from './useAntdTable';

import useFusionTable from './useFusionTable';
import useGetState from './useGetState';
import useHistoryTravel from './useHistoryTravel';

@@ -46,3 +47,3 @@ import useHover from './useHover';

import useReactive from './useReactive';
import useRequest from './useRequest';
import useRequest, { clearCache } from './useRequest';
import { configResponsive, useResponsive } from './useResponsive';

@@ -72,3 +73,2 @@ import useSafeState from './useSafeState';

import useWhyDidYouUpdate from './useWhyDidYouUpdate';
import useGetState from './useGetState';
export { useRequest, 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, useUnmount, useSet, useMemoizedFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useReactive, useFavicon, useCountDown, useWebSocket, useLockFn, useUnmountedRef, useExternal, useSafeState, useLatest, useIsomorphicLayoutEffect, useDeepCompareEffect, useAsyncEffect, useLongPress, useRafState, useTrackedEffect, usePagination, useAntdTable, useFusionTable, useInfiniteScroll, useGetState, };
export { useRequest, 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, useUnmount, useSet, useMemoizedFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useReactive, useFavicon, useCountDown, useWebSocket, useLockFn, useUnmountedRef, useExternal, useSafeState, useLatest, useIsomorphicLayoutEffect, useDeepCompareEffect, useAsyncEffect, useLongPress, useRafState, useTrackedEffect, usePagination, useAntdTable, useFusionTable, useInfiniteScroll, useGetState, clearCache, };

@@ -25,2 +25,3 @@ import useAntdTable from './useAntdTable';

import useFusionTable from './useFusionTable';
import useGetState from './useGetState';
import useHistoryTravel from './useHistoryTravel';

@@ -46,3 +47,3 @@ import useHover from './useHover';

import useReactive from './useReactive';
import useRequest from './useRequest';
import useRequest, { clearCache } from './useRequest';
import { configResponsive, useResponsive } from './useResponsive';

@@ -72,3 +73,2 @@ import useSafeState from './useSafeState';

import useWhyDidYouUpdate from './useWhyDidYouUpdate';
import useGetState from './useGetState';
export { useRequest, 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, useUnmount, useSet, useMemoizedFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useReactive, useFavicon, useCountDown, useWebSocket, useLockFn, useUnmountedRef, useExternal, useSafeState, useLatest, useIsomorphicLayoutEffect, useDeepCompareEffect, useAsyncEffect, useLongPress, useRafState, useTrackedEffect, usePagination, useAntdTable, useFusionTable, useInfiniteScroll, useGetState };
export { useRequest, 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, useUnmount, useSet, useMemoizedFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useReactive, useFavicon, useCountDown, useWebSocket, useLockFn, useUnmountedRef, useExternal, useSafeState, useLatest, useIsomorphicLayoutEffect, useDeepCompareEffect, useAsyncEffect, useLongPress, useRafState, useTrackedEffect, usePagination, useAntdTable, useFusionTable, useInfiniteScroll, useGetState, clearCache };
import useRequest from './src/useRequest';
import { clearCache } from './src/utils/cache';
export { clearCache };
export default useRequest;
import useRequest from './src/useRequest';
import { clearCache } from './src/utils/cache';
export { clearCache };
export default useRequest;

@@ -13,2 +13,3 @@ declare type Timer = ReturnType<typeof setTimeout>;

declare const subscribe: (key: string, listener: Listener) => () => void;
export { getCache, setCache, subscribe };
declare const clearCache: (key?: string | string[] | undefined) => void;
export { getCache, setCache, subscribe, clearCache };

@@ -51,2 +51,13 @@ var cache = new Map();

export { getCache, setCache, subscribe };
var clearCache = function clearCache(key) {
if (key) {
var cacheKeys = Array.isArray(key) ? key : [key];
cacheKeys.forEach(function (cacheKey) {
return cache["delete"](cacheKey);
});
} else {
cache.clear();
}
};
export { getCache, setCache, subscribe, clearCache };

@@ -25,2 +25,3 @@ import useAntdTable from './useAntdTable';

import useFusionTable from './useFusionTable';
import useGetState from './useGetState';
import useHistoryTravel from './useHistoryTravel';

@@ -46,3 +47,3 @@ import useHover from './useHover';

import useReactive from './useReactive';
import useRequest from './useRequest';
import useRequest, { clearCache } from './useRequest';
import { configResponsive, useResponsive } from './useResponsive';

@@ -72,3 +73,2 @@ import useSafeState from './useSafeState';

import useWhyDidYouUpdate from './useWhyDidYouUpdate';
import useGetState from './useGetState';
export { useRequest, 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, useUnmount, useSet, useMemoizedFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useReactive, useFavicon, useCountDown, useWebSocket, useLockFn, useUnmountedRef, useExternal, useSafeState, useLatest, useIsomorphicLayoutEffect, useDeepCompareEffect, useAsyncEffect, useLongPress, useRafState, useTrackedEffect, usePagination, useAntdTable, useFusionTable, useInfiniteScroll, useGetState, };
export { useRequest, 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, useUnmount, useSet, useMemoizedFn, useMap, useCreation, useDrag, useDrop, useMount, useCounter, useUpdate, useTextSelection, useEventTarget, useHistoryTravel, useCookieState, useSetState, useInterval, useWhyDidYouUpdate, useTitle, useNetwork, useTimeout, useReactive, useFavicon, useCountDown, useWebSocket, useLockFn, useUnmountedRef, useExternal, useSafeState, useLatest, useIsomorphicLayoutEffect, useDeepCompareEffect, useAsyncEffect, useLongPress, useRafState, useTrackedEffect, usePagination, useAntdTable, useFusionTable, useInfiniteScroll, useGetState, clearCache, };
"use strict";
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function get() {
return m[k];
}
});
} : function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
} : function (o, v) {
o["default"] = v;
});
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {

@@ -12,3 +46,3 @@ return mod && mod.__esModule ? mod : {

});
exports.useGetState = exports.useInfiniteScroll = exports.useFusionTable = exports.useAntdTable = exports.usePagination = exports.useTrackedEffect = exports.useRafState = exports.useLongPress = exports.useAsyncEffect = exports.useDeepCompareEffect = exports.useIsomorphicLayoutEffect = exports.useLatest = exports.useSafeState = exports.useExternal = exports.useUnmountedRef = exports.useLockFn = exports.useWebSocket = exports.useCountDown = exports.useFavicon = exports.useReactive = exports.useTimeout = exports.useNetwork = exports.useTitle = exports.useWhyDidYouUpdate = exports.useInterval = exports.useSetState = exports.useCookieState = exports.useHistoryTravel = exports.useEventTarget = exports.useTextSelection = exports.useUpdate = exports.useCounter = exports.useMount = exports.useDrop = exports.useDrag = exports.useCreation = exports.useMap = exports.useMemoizedFn = exports.useSet = exports.useUnmount = 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.useRequest = void 0;
exports.clearCache = exports.useGetState = exports.useInfiniteScroll = exports.useFusionTable = exports.useAntdTable = exports.usePagination = exports.useTrackedEffect = exports.useRafState = exports.useLongPress = exports.useAsyncEffect = exports.useDeepCompareEffect = exports.useIsomorphicLayoutEffect = exports.useLatest = exports.useSafeState = exports.useExternal = exports.useUnmountedRef = exports.useLockFn = exports.useWebSocket = exports.useCountDown = exports.useFavicon = exports.useReactive = exports.useTimeout = exports.useNetwork = exports.useTitle = exports.useWhyDidYouUpdate = exports.useInterval = exports.useSetState = exports.useCookieState = exports.useHistoryTravel = exports.useEventTarget = exports.useTextSelection = exports.useUpdate = exports.useCounter = exports.useMount = exports.useDrop = exports.useDrag = exports.useCreation = exports.useMap = exports.useMemoizedFn = exports.useSet = exports.useUnmount = 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.useRequest = void 0;

@@ -111,2 +145,6 @@ var useAntdTable_1 = __importDefault(require("./useAntdTable"));

var useGetState_1 = __importDefault(require("./useGetState"));
exports.useGetState = useGetState_1["default"];
var useHistoryTravel_1 = __importDefault(require("./useHistoryTravel"));

@@ -192,5 +230,11 @@

var useRequest_1 = __importDefault(require("./useRequest"));
var useRequest_1 = __importStar(require("./useRequest"));
exports.useRequest = useRequest_1["default"];
Object.defineProperty(exports, "clearCache", {
enumerable: true,
get: function get() {
return useRequest_1.clearCache;
}
});

@@ -302,6 +346,2 @@ var useResponsive_1 = require("./useResponsive");

exports.useWhyDidYouUpdate = useWhyDidYouUpdate_1["default"];
var useGetState_1 = __importDefault(require("./useGetState"));
exports.useGetState = useGetState_1["default"];
exports.useWhyDidYouUpdate = useWhyDidYouUpdate_1["default"];
import useRequest from './src/useRequest';
import { clearCache } from './src/utils/cache';
export { clearCache };
export default useRequest;

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

});
exports.clearCache = void 0;
var useRequest_1 = __importDefault(require("./src/useRequest"));
var cache_1 = require("./src/utils/cache");
Object.defineProperty(exports, "clearCache", {
enumerable: true,
get: function get() {
return cache_1.clearCache;
}
});
exports["default"] = useRequest_1["default"];

@@ -13,2 +13,3 @@ declare type Timer = ReturnType<typeof setTimeout>;

declare const subscribe: (key: string, listener: Listener) => () => void;
export { getCache, setCache, subscribe };
declare const clearCache: (key?: string | string[] | undefined) => void;
export { getCache, setCache, subscribe, clearCache };

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

});
exports.subscribe = exports.setCache = exports.getCache = void 0;
exports.clearCache = exports.subscribe = exports.setCache = exports.getCache = void 0;
var cache = new Map();

@@ -62,2 +62,15 @@ var listeners = {};

exports.subscribe = subscribe;
exports.subscribe = subscribe;
var clearCache = function clearCache(key) {
if (key) {
var cacheKeys = Array.isArray(key) ? key : [key];
cacheKeys.forEach(function (cacheKey) {
return cache["delete"](cacheKey);
});
} else {
cache.clear();
}
};
exports.clearCache = clearCache;
{
"name": "ahooks",
"version": "3.0.0-alpha.17",
"version": "3.0.0-alpha.18",
"description": "react hooks library",

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

"license": "MIT",
"gitHead": "adcc0e03501173cb34432c01875fcb197964a803"
"gitHead": "6f66ffcc2086ce9d34fbea0367ea1f04bf86c580"
}

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