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

fix: pass index & children to deepMap, deepForeach & deepFind #17

Merged
merged 1 commit into from Apr 19, 2020

Conversation

dpinol
Copy link
Contributor

@dpinol dpinol commented Apr 19, 2020

Suggested implementation of #16

@codecov
Copy link

codecov bot commented Apr 19, 2020

Codecov Report

Merging #17 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #17   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          102       102           
  Branches        16        16           
=========================================
  Hits           102       102           
Impacted Files Coverage Δ
src/lib/deepFind.ts 100.00% <100.00%> (ø)
src/lib/deepForEach.ts 100.00% <100.00%> (ø)
src/lib/deepMap.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92c8f28...8920427. Read the comment docs.

@fernandopasik
Copy link
Owner

I think your IDE is not using the prettier config or version that the repo has

@fernandopasik
Copy link
Owner

Sorry, I've verified that wasn't the case

@fernandopasik
Copy link
Owner

I think the same is happening for filter and deepFilter could you fix those as well?

@dpinol
Copy link
Contributor Author

dpinol commented Apr 19, 2020

filter & deepFilter don't need any change because the filter function is directly passed to the Array filter function.

  return Children.toArray(children).filter(filterFn);

  return Children.toArray(children)
    .filter(deepFilterFn)

@fernandopasik fernandopasik merged commit d65fff2 into fernandopasik:master Apr 19, 2020
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.

None yet

2 participants