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.3.8 to 3.3.9

LICENSE

2

es/useCookieState/index.d.ts

@@ -6,3 +6,3 @@ import Cookies from 'js-cookie';

}
declare function useCookieState(cookieKey: string, options?: Options): readonly [string | undefined, (this: unknown, newValue: string | ((prevState: State) => State) | undefined, newOptions?: Cookies.CookieAttributes | undefined) => void];
declare function useCookieState(cookieKey: string, options?: Options): readonly [string | undefined, (newValue: string | ((prevState: State) => State) | undefined, newOptions?: Cookies.CookieAttributes) => void];
export default useCookieState;

@@ -13,7 +13,7 @@ export interface Options {

declare function useCounter(initialValue?: number, options?: Options): readonly [number, {
readonly inc: (this: unknown, delta?: number | undefined) => void;
readonly dec: (this: unknown, delta?: number | undefined) => void;
readonly set: (this: unknown, value: ValueParam) => void;
readonly reset: (this: unknown) => void;
readonly inc: (delta?: number) => void;
readonly dec: (delta?: number) => void;
readonly set: (value: ValueParam) => void;
readonly reset: () => void;
}];
export default useCounter;

@@ -7,7 +7,7 @@ import type { BasicTarget } from '../utils/domTarget';

declare const useFullscreen: (target: BasicTarget, options?: Options | undefined) => readonly [boolean, {
readonly enterFullscreen: (this: unknown) => void;
readonly exitFullscreen: (this: unknown) => void;
readonly toggleFullscreen: (this: unknown) => void;
readonly enterFullscreen: () => void;
readonly exitFullscreen: () => void;
readonly toggleFullscreen: () => void;
readonly isEnabled: true;
}];
export default useFullscreen;

@@ -5,7 +5,7 @@ export default function useHistoryTravel<T>(initialValue?: T): {

forwardLength: number;
setValue: (this: unknown, val: T) => void;
go: (this: unknown, step: number) => void;
back: (this: unknown) => void;
forward: (this: unknown) => void;
reset: (this: unknown, ...args: any[]) => void;
setValue: (val: T) => void;
go: (step: number) => void;
back: () => void;
forward: () => void;
reset: (...params: any[]) => void;
};

@@ -8,6 +8,6 @@ /// <reference types="react" />

noMore: boolean;
loadMore: (this: unknown) => void;
loadMoreAsync: (this: unknown) => Promise<TData> | undefined;
reload: (this: unknown) => void;
reloadAsync: (this: unknown) => Promise<TData>;
loadMore: () => void;
loadMoreAsync: () => Promise<TData>;
reload: () => void;
reloadAsync: () => Promise<TData>;
mutate: import("react").Dispatch<import("react").SetStateAction<TData | undefined>>;

@@ -14,0 +14,0 @@ cancel: () => void;

@@ -287,3 +287,3 @@ var __assign = this && this.__assign || function () {

var loadMore = function loadMore() {
if (noMore) return;
// if (noMore) return;
setLoadingMore(true);

@@ -294,3 +294,3 @@ run(finalData);

var loadMoreAsync = function loadMoreAsync() {
if (noMore) return;
// if (noMore) return;
setLoadingMore(true);

@@ -297,0 +297,0 @@ return runAsync(finalData);

@@ -7,3 +7,3 @@ import type { DependencyList } from 'react';

};
export declare type Service<TData extends Data> = (currentData?: TData) => Promise<TData>;
export declare type Service<TData extends Data> = (currentData?: Data) => Promise<TData>;
export interface InfiniteScrollResult<TData extends Data> {

@@ -10,0 +10,0 @@ data: TData;

declare function useMap<K, T>(initialValue?: Iterable<readonly [K, T]>): readonly [Map<K, T>, {
readonly set: (this: unknown, key: K, entry: T) => void;
readonly setAll: (this: unknown, newMap: Iterable<readonly [K, T]>) => void;
readonly remove: (this: unknown, key: K) => void;
readonly reset: (this: unknown) => void;
readonly get: (this: unknown, key: K) => T | undefined;
readonly set: (key: K, entry: T) => void;
readonly setAll: (newMap: Iterable<readonly [K, T]>) => void;
readonly remove: (key: K) => void;
readonly reset: () => void;
readonly get: (key: K) => T | undefined;
}];
export default useMap;
declare type noop = (this: any, ...args: any[]) => any;
declare type PickFunction<T extends noop> = (this: ThisParameterType<T>, ...args: Parameters<T>) => ReturnType<T>;
declare function useMemoizedFn<T extends noop>(fn: T): PickFunction<T>;
declare function useMemoizedFn<T extends noop>(fn: T): T;
export default useMemoizedFn;

@@ -9,8 +9,8 @@ /// <reference types="react" />

readonly isSelected: (item: T) => boolean;
readonly select: (this: unknown, item: T) => void;
readonly unSelect: (this: unknown, item: T) => void;
readonly toggle: (this: unknown, item: T) => void;
readonly selectAll: (this: unknown) => void;
readonly unSelectAll: (this: unknown) => void;
readonly toggleAll: (this: unknown) => void;
readonly select: (item: T) => void;
readonly unSelect: (item: T) => void;
readonly toggle: (item: T) => void;
readonly selectAll: () => void;
readonly unSelectAll: () => void;
readonly toggleAll: () => void;
};
declare function useSet<K>(initialValue?: Iterable<K>): readonly [Set<K>, {
readonly add: (this: unknown, key: K) => void;
readonly remove: (this: unknown, key: K) => void;
readonly reset: (this: unknown) => void;
readonly add: (key: K) => void;
readonly remove: (key: K) => void;
readonly reset: () => void;
}];
export default useSet;

@@ -11,3 +11,3 @@ import type { BasicTarget } from '../utils/domTarget';

data: T;
}[], (this: unknown, index: number) => void];
}[], (index: number) => void];
export default useVirtualList;

@@ -6,3 +6,3 @@ import Cookies from 'js-cookie';

}
declare function useCookieState(cookieKey: string, options?: Options): readonly [string | undefined, (this: unknown, newValue: string | ((prevState: State) => State) | undefined, newOptions?: Cookies.CookieAttributes | undefined) => void];
declare function useCookieState(cookieKey: string, options?: Options): readonly [string | undefined, (newValue: string | ((prevState: State) => State) | undefined, newOptions?: Cookies.CookieAttributes) => void];
export default useCookieState;

@@ -13,7 +13,7 @@ export interface Options {

declare function useCounter(initialValue?: number, options?: Options): readonly [number, {
readonly inc: (this: unknown, delta?: number | undefined) => void;
readonly dec: (this: unknown, delta?: number | undefined) => void;
readonly set: (this: unknown, value: ValueParam) => void;
readonly reset: (this: unknown) => void;
readonly inc: (delta?: number) => void;
readonly dec: (delta?: number) => void;
readonly set: (value: ValueParam) => void;
readonly reset: () => void;
}];
export default useCounter;

@@ -7,7 +7,7 @@ import type { BasicTarget } from '../utils/domTarget';

declare const useFullscreen: (target: BasicTarget, options?: Options | undefined) => readonly [boolean, {
readonly enterFullscreen: (this: unknown) => void;
readonly exitFullscreen: (this: unknown) => void;
readonly toggleFullscreen: (this: unknown) => void;
readonly enterFullscreen: () => void;
readonly exitFullscreen: () => void;
readonly toggleFullscreen: () => void;
readonly isEnabled: true;
}];
export default useFullscreen;

@@ -5,7 +5,7 @@ export default function useHistoryTravel<T>(initialValue?: T): {

forwardLength: number;
setValue: (this: unknown, val: T) => void;
go: (this: unknown, step: number) => void;
back: (this: unknown) => void;
forward: (this: unknown) => void;
reset: (this: unknown, ...args: any[]) => void;
setValue: (val: T) => void;
go: (step: number) => void;
back: () => void;
forward: () => void;
reset: (...params: any[]) => void;
};

@@ -8,6 +8,6 @@ /// <reference types="react" />

noMore: boolean;
loadMore: (this: unknown) => void;
loadMoreAsync: (this: unknown) => Promise<TData> | undefined;
reload: (this: unknown) => void;
reloadAsync: (this: unknown) => Promise<TData>;
loadMore: () => void;
loadMoreAsync: () => Promise<TData>;
reload: () => void;
reloadAsync: () => Promise<TData>;
mutate: import("react").Dispatch<import("react").SetStateAction<TData | undefined>>;

@@ -14,0 +14,0 @@ cancel: () => void;

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

var loadMore = function loadMore() {
if (noMore) return;
// if (noMore) return;
setLoadingMore(true);

@@ -312,3 +312,3 @@ run(finalData);

var loadMoreAsync = function loadMoreAsync() {
if (noMore) return;
// if (noMore) return;
setLoadingMore(true);

@@ -315,0 +315,0 @@ return runAsync(finalData);

@@ -7,3 +7,3 @@ import type { DependencyList } from 'react';

};
export declare type Service<TData extends Data> = (currentData?: TData) => Promise<TData>;
export declare type Service<TData extends Data> = (currentData?: Data) => Promise<TData>;
export interface InfiniteScrollResult<TData extends Data> {

@@ -10,0 +10,0 @@ data: TData;

declare function useMap<K, T>(initialValue?: Iterable<readonly [K, T]>): readonly [Map<K, T>, {
readonly set: (this: unknown, key: K, entry: T) => void;
readonly setAll: (this: unknown, newMap: Iterable<readonly [K, T]>) => void;
readonly remove: (this: unknown, key: K) => void;
readonly reset: (this: unknown) => void;
readonly get: (this: unknown, key: K) => T | undefined;
readonly set: (key: K, entry: T) => void;
readonly setAll: (newMap: Iterable<readonly [K, T]>) => void;
readonly remove: (key: K) => void;
readonly reset: () => void;
readonly get: (key: K) => T | undefined;
}];
export default useMap;
declare type noop = (this: any, ...args: any[]) => any;
declare type PickFunction<T extends noop> = (this: ThisParameterType<T>, ...args: Parameters<T>) => ReturnType<T>;
declare function useMemoizedFn<T extends noop>(fn: T): PickFunction<T>;
declare function useMemoizedFn<T extends noop>(fn: T): T;
export default useMemoizedFn;

@@ -9,8 +9,8 @@ /// <reference types="react" />

readonly isSelected: (item: T) => boolean;
readonly select: (this: unknown, item: T) => void;
readonly unSelect: (this: unknown, item: T) => void;
readonly toggle: (this: unknown, item: T) => void;
readonly selectAll: (this: unknown) => void;
readonly unSelectAll: (this: unknown) => void;
readonly toggleAll: (this: unknown) => void;
readonly select: (item: T) => void;
readonly unSelect: (item: T) => void;
readonly toggle: (item: T) => void;
readonly selectAll: () => void;
readonly unSelectAll: () => void;
readonly toggleAll: () => void;
};
declare function useSet<K>(initialValue?: Iterable<K>): readonly [Set<K>, {
readonly add: (this: unknown, key: K) => void;
readonly remove: (this: unknown, key: K) => void;
readonly reset: (this: unknown) => void;
readonly add: (key: K) => void;
readonly remove: (key: K) => void;
readonly reset: () => void;
}];
export default useSet;

@@ -11,3 +11,3 @@ import type { BasicTarget } from '../utils/domTarget';

data: T;
}[], (this: unknown, index: number) => void];
}[], (index: number) => void];
export default useVirtualList;
{
"name": "ahooks",
"version": "3.3.8",
"version": "3.3.9",
"description": "react hooks library",

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

"license": "MIT",
"gitHead": "2d1cc85e6ef0ae4a32f2115035a87a1bb643a17f"
"gitHead": "839fa463641c030318e8d6378a3f0ae14c6eb407"
}

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