Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(iterPipe): Add iterPipe #520

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

cjquines
Copy link
Collaborator

kinda closes #74

TODO:

  • add the other overloads
  • more tests

Make sure that you:

  • Typedoc added for new methods and updated for changed
  • Tests added for new methods and updated for changed
  • New methods added to src/index.ts
  • New methods added to mapping.md

We use semantic PR titles to automate the release process!

https://conventionalcommits.org

PRs should be titled following using the format: < TYPE >(< scope >)?: description

Available Types:

  • feat: new functions, and changes to a function's type that would impact users.
  • fix: changes to the runtime behavior of an existing function, or refinements to it's type that shouldn't impact most users.
  • perf: changes to function implementations that improve a functions runtime performance.
  • refactor: changes to function implementations that are neither fix nor perf
  • test: tests-only changes (transparent to users of the function).
  • docs: changes to the documentation of a function or the documentation site.
  • build, ci, style, chore, and revert: are only relevant for the internals of the library.

For scope put the name of the function you are working on (either new or
existing).

*/
export function iterPipe<A, B>(
values: IterableIterator<A>,
op1: (value: A) => LazyResult<B>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: we can also do

op1: (value: A) => LazyResult<B> | IterableIterator<B>

so we can write the example, where we include a function *. i think it should be possible to tell this apart on runtime, it has hasNext if it's a LazyResult, otherwise it's an IterableIterator

tsconfig.json Outdated Show resolved Hide resolved
Copy link

codesandbox-ci bot commented Feb 16, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ba94f0a:

Sandbox Source
remeda-example-vanilla Configuration

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: Patch coverage is 94.28571% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 98.44%. Comparing base (96a4e82) to head (ba94f0a).
Report is 48 commits behind head on master.

❗ Current head ba94f0a differs from pull request most recent head 5b13bde. Consider uploading reports for the commit 5b13bde to get more accurate results

Files Patch % Lines
src/iterPipe.ts 94.28% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #520      +/-   ##
==========================================
+ Coverage   98.41%   98.44%   +0.03%     
==========================================
  Files         127      136       +9     
  Lines        7954     8881     +927     
  Branches      724      766      +42     
==========================================
+ Hits         7828     8743     +915     
- Misses        123      135      +12     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cjquines cjquines closed this Mar 7, 2024
@eranhirsch
Copy link
Collaborator

Why did you close the PR @cjquines ?

@cjquines
Copy link
Collaborator Author

cjquines commented Mar 7, 2024

@eranhirsch i couldn't find the convert to draft button oops. i'll reopen as a draft with some more fixes

@eranhirsch
Copy link
Collaborator

Should be on the right-side panel, somewhere near the reviewers box

@cjquines cjquines reopened this Mar 8, 2024
@cjquines cjquines marked this pull request as draft March 8, 2024 07:26
@cjquines cjquines mentioned this pull request Mar 10, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possiblity to directly use iterators ?
2 participants