@devisfuture/mega-collection 1.1.2 → 1.1.4

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  What does this package solve?
12
12
 
13
- Sometimes in projects, you need to iterate through huge collections (20,000, 40,000, 80,000 elements in an array) that have come from the server. Usually, the most common features are searching, filtering, and sorting.
13
+ Sometimes in projects, you need to iterate through huge collections (100K+ elements in an array) that have come from the server. Usually, the most common features are searching, filtering, and sorting.
14
14
  So, this package helps to perform searching, filtering, and sorting of large collections faster than standard JavaScript methods. This operation is performed before rendering the UI content.
15
15
 
16
16
  Zero dependencies. Tree-shakeable. Import only what you need.
@@ -83,7 +83,7 @@ const engine = new MergeEngines<User>({
83
83
  // dataset is passed once at init — no need to repeat it in every call
84
84
  engine.search("john");
85
85
  engine.sort([{ field: "age", direction: "asc" }]);
86
- engine.filter([{ field: "city", values: ["Kyiv", "Lviv"] }]);
86
+ engine.filter([{ field: "city", values: ["Miami", "New York"] }]);
87
87
  ```
88
88
 
89
89
  ---
@@ -130,13 +130,13 @@ const engine = new FilterEngine<User>({
130
130
  });
131
131
 
132
132
  engine.filter([
133
- { field: "city", values: ["Kyiv", "Lviv"] },
133
+ { field: "city", values: ["Miami", "New York"] },
134
134
  { field: "age", values: [25, 30, 35] },
135
135
  ]);
136
136
 
137
137
  // Sequential mode example:
138
138
  // 1) First call filters by city
139
- const byCity = engine.filter([{ field: "city", values: ["Dnipro"] }]);
139
+ const byCity = engine.filter([{ field: "city", values: ["Miami"] }]);
140
140
  // 2) Second call filters only inside previous result
141
141
  const byCityAndAge = engine.filter([{ field: "age", values: [22] }]);
142
142
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devisfuture/mega-collection",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "High-performance search, filter & sort engine for 100K+ item collections in JavaScript/TypeScript",
5
5
  "exports": {
6
6
  ".": {