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

fenextjs-hook

Package Overview
Dependencies
Maintainers
1
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fenextjs-hook - npm Package Compare versions

Comparing version 1.2.28 to 1.2.29

5

cjs/useQuery.d.ts

@@ -23,6 +23,9 @@ /**

export type useQuery_QueryKeysProps = keyof useQuery_QueryProps;
export interface useQueryProps {
ignoreQuerys: [id: useQuery_QueryKeysProps];
}
/**
* A hook that provides access to the query parameters in the URL.
*/
export declare const useQuery: () => {
export declare const useQuery: (props?: Partial<useQueryProps>) => {
query: useQuery_QueryProps;

@@ -29,0 +32,0 @@ setQuery: (query: useQuery_QueryProps) => void;

11

cjs/useQuery.js

@@ -9,3 +9,4 @@ "use strict";

*/
const useQuery = () => {
const useQuery = (props) => {
const { ignoreQuerys } = (0, react_1.useMemo)(() => props ?? {}, [props]);
/**

@@ -25,3 +26,3 @@ * Whether the query has been changed.

const { id = undefined, search = "", searchAddress = "", tab = "all", page = "0", npage = "10", totalpage = "100", allitems = "1000", start = undefined, end = undefined, order = undefined, orderBy = undefined, ...props } = q;
return {
const r = {
id,

@@ -42,3 +43,7 @@ search,

};
}, [router.query]);
(ignoreQuerys ?? []).map((e) => {
delete r[e];
});
return r;
}, [router.query, ignoreQuerys]);
/**

@@ -45,0 +50,0 @@ * Sets the query parameters in the URL.

@@ -23,6 +23,9 @@ /**

export type useQuery_QueryKeysProps = keyof useQuery_QueryProps;
export interface useQueryProps {
ignoreQuerys: [id: useQuery_QueryKeysProps];
}
/**
* A hook that provides access to the query parameters in the URL.
*/
export declare const useQuery: () => {
export declare const useQuery: (props?: Partial<useQueryProps>) => {
query: useQuery_QueryProps;

@@ -29,0 +32,0 @@ setQuery: (query: useQuery_QueryProps) => void;

@@ -6,3 +6,4 @@ import { useRouter } from "next/router";

*/
export const useQuery = () => {
export const useQuery = (props) => {
const { ignoreQuerys } = useMemo(() => props ?? {}, [props]);
/**

@@ -22,3 +23,3 @@ * Whether the query has been changed.

const { id = undefined, search = "", searchAddress = "", tab = "all", page = "0", npage = "10", totalpage = "100", allitems = "1000", start = undefined, end = undefined, order = undefined, orderBy = undefined, ...props } = q;
return {
const r = {
id,

@@ -39,3 +40,7 @@ search,

};
}, [router.query]);
(ignoreQuerys ?? []).map((e) => {
delete r[e];
});
return r;
}, [router.query, ignoreQuerys]);
/**

@@ -42,0 +47,0 @@ * Sets the query parameters in the URL.

{
"name": "fenextjs-hook",
"version": "1.2.28",
"version": "1.2.29",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js",

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