feat(iterator): add iterator collection helpers with docs and tests#574
Conversation
nev21
commented
May 29, 2026
- add new iterator helper module with typed exports:
- iterMap, iterFilter, iterTake, iterReduce, iterSome, iterEvery, iterToArray
- arrToMap, iterUnion, iterIntersection, iterDifference
- IterMapCallbackFn, IterPredicateCallbackFn, IterReduceCallbackFn, ArrToMapKeySelectorFn, ArrToMapValueSelectorFn
- export new iterator helpers from index.ts
- add comprehensive common tests for helper behavior and edge cases in helpers.test.ts
- add TypeDoc examples and mark new APIs as @SInCE 0.15.0 in helpers.ts
- update Iterator utility matrix in README.md to include all new helper links
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #574 +/- ##
==========================================
- Coverage 99.35% 99.24% -0.11%
==========================================
Files 165 178 +13
Lines 5089 5417 +328
Branches 1116 1186 +70
==========================================
+ Hits 5056 5376 +320
- Misses 33 41 +8
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds iterator and collection helper APIs to @nevware21/ts-utils, along with exports, documentation, tests, and updated size thresholds.
Changes:
- Added iterator helpers for mapping, filtering, taking, reducing, predicates, materialization, and set-like operations.
- Added
arrToMapand related public callback types. - Added common tests, README utility links, backlog cleanup, and adjusted bundle size limits.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Adds new iterator helper links to the utility matrix. |
.size-limit.json |
Raises size-limit thresholds for expanded bundle output. |
docs/feature-backlog.md |
Removes implemented iterator helper backlog items. |
lib/test/bundle-size-check.js |
Raises bundle size check thresholds. |
lib/src/index.ts |
Exports new array and iterator helper APIs. |
lib/src/array/arrToMap.ts |
Adds object-map creation helper. |
lib/src/iterator/types.ts |
Adds callback type aliases for new helpers. |
lib/src/iterator/helpers.ts |
Adds internal iterator normalization helpers. |
lib/src/iterator/iterMap.ts |
Adds lazy iterator map helper. |
lib/src/iterator/iterFilter.ts |
Adds lazy iterator filter helper. |
lib/src/iterator/iterTake.ts |
Adds lazy iterator take helper. |
lib/src/iterator/iterReduce.ts |
Adds iterator reduce helper. |
lib/src/iterator/iterSome.ts |
Adds iterator some helper. |
lib/src/iterator/iterEvery.ts |
Adds iterator every helper. |
lib/src/iterator/iterToArray.ts |
Adds iterator materialization helper. |
lib/src/iterator/iterUnion.ts |
Adds iterator union helper. |
lib/src/iterator/iterIntersection.ts |
Adds iterator intersection helper. |
lib/src/iterator/iterDifference.ts |
Adds iterator difference helper. |
lib/test/src/common/array/arrToMap.test.ts |
Adds tests for arrToMap. |
lib/test/src/common/iterator/iterMap.test.ts |
Adds tests for iterMap. |
lib/test/src/common/iterator/iterFilter.test.ts |
Adds tests for iterFilter. |
lib/test/src/common/iterator/iterTake.test.ts |
Adds tests for iterTake. |
lib/test/src/common/iterator/iterReduce.test.ts |
Adds tests for iterReduce. |
lib/test/src/common/iterator/iterSome.test.ts |
Adds tests for iterSome. |
lib/test/src/common/iterator/iterEvery.test.ts |
Adds tests for iterEvery. |
lib/test/src/common/iterator/iterToArray.test.ts |
Adds tests for iterToArray. |
lib/test/src/common/iterator/iterUnion.test.ts |
Adds tests for iterUnion. |
lib/test/src/common/iterator/iterIntersection.test.ts |
Adds tests for iterIntersection. |
lib/test/src/common/iterator/iterDifference.test.ts |
Adds tests for iterDifference. |
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
- add new iterator helper module with typed exports: - iterMap, iterFilter, iterTake, iterReduce, iterSome, iterEvery, iterToArray - arrToMap, iterUnion, iterIntersection, iterDifference - IterMapCallbackFn, IterPredicateCallbackFn, IterReduceCallbackFn, ArrToMapKeySelectorFn, ArrToMapValueSelectorFn - export new iterator helpers from index.ts - add comprehensive common tests for helper behavior and edge cases in helpers.test.ts - add TypeDoc examples and mark new APIs as @SInCE 0.15.0 in helpers.ts - update Iterator utility matrix in README.md to include all new helper links
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot