@perch33/react-usefilter-hook 1.0.2 β 1.0.3
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 +18 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,6 @@ or
|
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
34
|
yarn add @perch33/react-usefilter-hook
|
|
35
|
-
|
|
36
35
|
```
|
|
37
36
|
|
|
38
37
|
## π Usage Example (Basic)
|
|
@@ -121,31 +120,37 @@ useFilter<T>(data, key, errorComponent);
|
|
|
121
120
|
### βοΈ How filtering works
|
|
122
121
|
|
|
123
122
|
- This hook automatically:
|
|
124
|
-
|
|
125
123
|
- Converts text to lowercase
|
|
126
|
-
|
|
127
124
|
- Removes accents (ÑéΓΓ³ΓΊ β aeiou)
|
|
128
|
-
|
|
129
125
|
- Removes punctuation and special characters
|
|
130
|
-
|
|
131
126
|
- Performs a normalized comparison
|
|
132
|
-
|
|
133
127
|
- Filters in real time as the user types
|
|
134
128
|
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## π Used in Production (Real Examples)
|
|
132
|
+
|
|
133
|
+
This hook is currently used in my personal website:
|
|
134
|
+
|
|
135
|
+
- πΌ **Music Scores / Partituras**
|
|
136
|
+
Live search using `useFilter` to filter music scores dynamically.
|
|
137
|
+
π https://www.percychuzon.com/partituras
|
|
138
|
+
|
|
139
|
+
- βοΈ **Blog**
|
|
140
|
+
Used to filter blog posts instantly with accent-insensitive matching.
|
|
141
|
+
π https://www.percychuzon.com/blog
|
|
142
|
+
|
|
143
|
+
These sections demonstrate real-world usage of the hook with dynamic content,
|
|
144
|
+
search inputs, and accent-normalized filtering.
|
|
145
|
+
|
|
135
146
|
### π‘ When to use this hook?
|
|
136
147
|
|
|
137
148
|
- Product search inputs
|
|
138
|
-
|
|
139
149
|
- Admin panel filters
|
|
140
|
-
|
|
141
150
|
- Searchable dropdowns
|
|
142
|
-
|
|
143
151
|
- User lists
|
|
144
|
-
|
|
145
152
|
- Blog post search
|
|
146
|
-
|
|
147
153
|
- Table filtering
|
|
148
|
-
|
|
149
154
|
- Autocomplete components
|
|
150
155
|
|
|
151
156
|
## π Project Structure
|
|
@@ -153,7 +158,6 @@ useFilter<T>(data, key, errorComponent);
|
|
|
153
158
|
Your installation will contain:
|
|
154
159
|
|
|
155
160
|
```
|
|
156
|
-
|
|
157
161
|
dist/
|
|
158
162
|
ββ cjs/
|
|
159
163
|
ββ esm/
|
|
@@ -166,4 +170,4 @@ README.md
|
|
|
166
170
|
|
|
167
171
|
**Percy Chuzon**
|
|
168
172
|
π§ [contacto@percychuzon.com](mailto:contacto@percychuzon.com)
|
|
169
|
-
π [https://
|
|
173
|
+
π [https://www.percychuzon.com](https://www.percychuzon.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perch33/react-usefilter-hook",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A lightweight and reusable React hook for filtering lists with accent normalization, punctuation removal and TypeScript support.",
|
|
5
5
|
"main": "dist/cjs/index.min.js",
|
|
6
6
|
"module": "dist/esm/index.min.js",
|