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(invert): Fixed invert not to invert inherited properties #221

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

changwoolab
Copy link
Contributor

lodash's invert does not invert inherited properties.
This PR fixes the implementation of invert to be compatible with lodash's implementation

You may close this PR if you want inherited properties to be inverted :)

Copy link

vercel bot commented Jul 16, 2024

@changwoolab is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.80%. Comparing base (51e1970) to head (72a21e1).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##              main     #221      +/-   ##
===========================================
- Coverage   100.00%   99.80%   -0.20%     
===========================================
  Files           86       86              
  Lines          499      501       +2     
  Branches        78       78              
===========================================
+ Hits           499      500       +1     
- Misses           0        1       +1     

raon0211
raon0211 previously approved these changes Jul 17, 2024
Copy link
Collaborator

@raon0211 raon0211 left a comment

Choose a reason for hiding this comment

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

Thanks!

src/object/invert.ts Outdated Show resolved Hide resolved
@raon0211 raon0211 merged commit 1ea74b7 into toss:main Jul 17, 2024
1 of 7 checks passed
seungrodotlee pushed a commit to seungrodotlee/es-toolkit that referenced this pull request Jul 18, 2024
)

* test: add tests to be compatible with lodash

* fix: invert not to invert inherited properties

* perf: slightly improve performance by not using for..of

* Update src/object/invert.ts

---------

Co-authored-by: Sojin Park <raon0211@gmail.com>
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.

3 participants