@vixsonous/map-array 1.0.0 → 1.0.2

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 +3 -3
  2. package/package.json +2 -7
package/README.md CHANGED
@@ -7,10 +7,10 @@ A TypeScript utility class that converts arrays into an O(1) lookup HashMap whil
7
7
  When working with arrays of objects, lookups like `array.find(item => item.id === id)` are O(N) — they scan the entire array every time. MapArray converts your array into a HashMap on initialization (O(N) once), then every subsequent lookup is O(1).
8
8
 
9
9
  ```ts
10
- // Without MapArray — O(N) every lookup
10
+ // Without MapArray — O(N) every lookup
11
11
  const user = users.find(u => u.id === "42");
12
12
 
13
- // With MapArray — O(1) every lookup
13
+ // With MapArray — O(1) every lookup
14
14
  const user = userMap.get("42");
15
15
  ```
16
16
 
@@ -193,7 +193,7 @@ const arr = [{ id: 1, name: "Alice" }];
193
193
  const map = new MapArray({ array: arr, idField: "id" });
194
194
 
195
195
  arr[0].name = "Bob";
196
- map.get("1")?.name; // Still "Alice"
196
+ map.get("1")?.name; // Still "Alice"
197
197
  ```
198
198
 
199
199
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vixsonous/map-array",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -10,12 +10,7 @@
10
10
  "build": "tsc",
11
11
  "test": "vitest run"
12
12
  },
13
- "keywords": [
14
- "map",
15
- "array",
16
- "hashmap",
17
- "typescript"
18
- ],
13
+ "keywords": ["map", "array", "hashmap", "typescript", "lookup", "o1", "performance", "data-structure", "iterator", "collection"],
19
14
  "author": {
20
15
  "name": "Victor Chiong",
21
16
  "email": "chiong.vict@gmail.com",