foxact 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +28 -19
- package/sizes.json +1 -1
- package/use-next-pathname/index.cjs +1 -0
- package/use-next-pathname/index.d.ts +4 -0
- package/use-next-pathname/index.js +1 -0
- package/use-next-pathname/index.mjs +1 -0
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Written in TypeScript. Unlocking strong typing benefits with TypeScript 4.8+.
|
|
|
26
26
|
|
|
27
27
|
#### Super Lightweight
|
|
28
28
|
|
|
29
|
-
The entire **foxact** library has zero dependencies and is **
|
|
29
|
+
The entire **foxact** library has zero dependencies and is **about 5 KiB gzipped in sum**, ensuring a lean and efficient solution. And what's more...
|
|
30
30
|
|
|
31
31
|
#### Fully Tree Shakable
|
|
32
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxact",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "React Hooks/Utils done right. For browser, SSR, and React Server Components.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -74,15 +74,6 @@
|
|
|
74
74
|
"require": "./noop/index.cjs",
|
|
75
75
|
"default": "./noop/index.js"
|
|
76
76
|
},
|
|
77
|
-
"./request-idle-callback": {
|
|
78
|
-
"types": "./request-idle-callback/index.d.ts",
|
|
79
|
-
"import": {
|
|
80
|
-
"types": "./request-idle-callback/index.d.ts",
|
|
81
|
-
"default": "./request-idle-callback/index.mjs"
|
|
82
|
-
},
|
|
83
|
-
"require": "./request-idle-callback/index.cjs",
|
|
84
|
-
"default": "./request-idle-callback/index.js"
|
|
85
|
-
},
|
|
86
77
|
"./typescript-happy-forward-ref": {
|
|
87
78
|
"types": "./typescript-happy-forward-ref/index.d.ts",
|
|
88
79
|
"import": {
|
|
@@ -119,6 +110,15 @@
|
|
|
119
110
|
"require": "./use-clipboard/index.cjs",
|
|
120
111
|
"default": "./use-clipboard/index.js"
|
|
121
112
|
},
|
|
113
|
+
"./request-idle-callback": {
|
|
114
|
+
"types": "./request-idle-callback/index.d.ts",
|
|
115
|
+
"import": {
|
|
116
|
+
"types": "./request-idle-callback/index.d.ts",
|
|
117
|
+
"default": "./request-idle-callback/index.mjs"
|
|
118
|
+
},
|
|
119
|
+
"require": "./request-idle-callback/index.cjs",
|
|
120
|
+
"default": "./request-idle-callback/index.js"
|
|
121
|
+
},
|
|
122
122
|
"./use-composition-input": {
|
|
123
123
|
"types": "./use-composition-input/index.d.ts",
|
|
124
124
|
"import": {
|
|
@@ -191,15 +191,6 @@
|
|
|
191
191
|
"require": "./use-map/index.cjs",
|
|
192
192
|
"default": "./use-map/index.js"
|
|
193
193
|
},
|
|
194
|
-
"./use-react-router-is-match": {
|
|
195
|
-
"types": "./use-react-router-is-match/index.d.ts",
|
|
196
|
-
"import": {
|
|
197
|
-
"types": "./use-react-router-is-match/index.d.ts",
|
|
198
|
-
"default": "./use-react-router-is-match/index.mjs"
|
|
199
|
-
},
|
|
200
|
-
"require": "./use-react-router-is-match/index.cjs",
|
|
201
|
-
"default": "./use-react-router-is-match/index.js"
|
|
202
|
-
},
|
|
203
194
|
"./use-react-router-enable-concurrent-navigation": {
|
|
204
195
|
"types": "./use-react-router-enable-concurrent-navigation/index.d.ts",
|
|
205
196
|
"import": {
|
|
@@ -209,6 +200,24 @@
|
|
|
209
200
|
"require": "./use-react-router-enable-concurrent-navigation/index.cjs",
|
|
210
201
|
"default": "./use-react-router-enable-concurrent-navigation/index.js"
|
|
211
202
|
},
|
|
203
|
+
"./use-next-pathname": {
|
|
204
|
+
"types": "./use-next-pathname/index.d.ts",
|
|
205
|
+
"import": {
|
|
206
|
+
"types": "./use-next-pathname/index.d.ts",
|
|
207
|
+
"default": "./use-next-pathname/index.mjs"
|
|
208
|
+
},
|
|
209
|
+
"require": "./use-next-pathname/index.cjs",
|
|
210
|
+
"default": "./use-next-pathname/index.js"
|
|
211
|
+
},
|
|
212
|
+
"./use-react-router-is-match": {
|
|
213
|
+
"types": "./use-react-router-is-match/index.d.ts",
|
|
214
|
+
"import": {
|
|
215
|
+
"types": "./use-react-router-is-match/index.d.ts",
|
|
216
|
+
"default": "./use-react-router-is-match/index.mjs"
|
|
217
|
+
},
|
|
218
|
+
"require": "./use-react-router-is-match/index.cjs",
|
|
219
|
+
"default": "./use-react-router-is-match/index.js"
|
|
220
|
+
},
|
|
212
221
|
"./use-retimer": {
|
|
213
222
|
"types": "./use-retimer/index.d.ts",
|
|
214
223
|
"import": {
|
package/sizes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"total":{"raw":
|
|
1
|
+
{"total":{"raw":9181,"gzip":5971,"br":0},"exports":{"context-state":{"raw":371,"gzip":240,"br":204},"typescript-happy-forward-ref":{"raw":118,"gzip":102,"br":87},"create-context-state":{"raw":146,"gzip":116,"br":102},"noop":{"raw":32,"gzip":52,"br":36},"use":{"raw":279,"gzip":175,"br":151},"use-array":{"raw":329,"gzip":242,"br":201},"request-idle-callback":{"raw":407,"gzip":231,"br":180},"use-clipboard":{"raw":1071,"gzip":614,"br":527},"use-composition-input":{"raw":420,"gzip":262,"br":230},"use-debounced-value":{"raw":370,"gzip":263,"br":214},"use-debounced-state":{"raw":380,"gzip":275,"br":231},"use-error-boundary":{"raw":238,"gzip":194,"br":158},"use-is-client":{"raw":148,"gzip":143,"br":115},"use-isomorphic-layout-effect":{"raw":177,"gzip":143,"br":120},"use-intersection":{"raw":1214,"gzip":652,"br":592},"use-map":{"raw":348,"gzip":243,"br":210},"use-next-pathname":{"raw":310,"gzip":234,"br":195},"use-retimer":{"raw":197,"gzip":165,"br":125},"use-react-router-is-match":{"raw":562,"gzip":369,"br":309},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":461,"gzip":325,"br":256},"use-react-router-enable-concurrent-navigation":{"raw":950,"gzip":453,"br":373},"use-set":{"raw":349,"gzip":242,"br":203},"use-uncontrolled":{"raw":304,"gzip":236,"br":201}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("client-only");var e=require("next/router"),t=require("react");exports.useNextPathname=function(){let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{asPath:u}=e.useRouter();return t.useMemo(()=>{let e=u.split(/[?#]/)[0];return r?e.endsWith("/")?e:"".concat(e,"/"):e},[r,u])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("client-only");var e=require("next/router"),t=require("react");exports.useNextPathname=function(){let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{asPath:u}=e.useRouter();return t.useMemo(()=>{let e=u.split(/[?#]/)[0];return r?e.endsWith("/")?e:"".concat(e,"/"):e},[r,u])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"client-only";import{useRouter as t}from"next/router";import{useMemo as e}from"react";let r=function(){let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{asPath:n}=t();return e(()=>{let t=n.split(/[?#]/)[0];return r?t.endsWith("/")?t:"".concat(t,"/"):t},[r,n])};export{r as useNextPathname};
|