-
-
Notifications
You must be signed in to change notification settings - Fork 842
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(func): add FuncWithIndex
and FuncWithIndexNoReturn
#565
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Nathanael DEMACON <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
==========================================
+ Coverage 94.33% 94.35% +0.01%
==========================================
Files 17 17
Lines 2790 2798 +8
==========================================
+ Hits 2632 2640 +8
Misses 154 154
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Wow. also faced that issue, and made a quite similar solution: |
Glad to see I'm not the only one wanting a feature like this :) |
I agree. But I would vote for duplicating
|
@samber If it's the one with index, I wonder if that's a good idea as it will break many projects. Or it will require a major update. What do you think? |
Yes 😅 I would break a large ecosystem. I'm just sharing some ideas. Not telling we are going to do it right now 😇 |
Then I really prefer this option! I'm not sure how people use Is there a place where contributors can discuss the changes for v2? I would like to help 😄 |
@quantumsheep see #579 |
Hey! I regularly write some functions that I pass to
lo.Map
and it's a hassle to have to pass the index every time.Currently:
With the PR:
I'm not sure about the naming, it could simply be
WithIndex
.I hope you like the idea.