Commit 5476156
committed
util: refactor filterDuplicateStrings for readability
Modernize filterDuplicateStrings by using for-of loop and ternary
operator for cleaner, more idiomatic ES2018 code.
Changes:
- Replace traditional for loop with for-of iteration
- Consolidate conditional map.set() using ternary operator
- Eliminate iterator variable reducing cognitive complexity
No functional changes, performance remains equivalent.1 parent 340e619 commit 5476156
1 file changed
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
330 | | - | |
| 329 | + | |
331 | 330 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 331 | + | |
337 | 332 | | |
338 | 333 | | |
339 | 334 | | |
| |||
0 commit comments