Skip to content

Conversation

@negezor
Copy link
Contributor

@negezor negezor commented May 8, 2024

The default implementation already returns boolean if the value has been deleted.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete#return_value

It's also faster since we don't double check the hashmap for a value.

@negezor negezor requested a review from a team as a code owner May 8, 2024 17:49
@lukekarrys lukekarrys changed the title chore(lru): use map.delete() directly May 8, 2024
Copy link
Contributor

@lukekarrys lukekarrys left a comment

Choose a reason for hiding this comment

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

Thank you!

@wraithgar wraithgar merged commit 6466ba9 into npm:main May 9, 2024
@github-actions github-actions bot mentioned this pull request May 9, 2024
wraithgar pushed a commit that referenced this pull request May 9, 2024
🤖 I have created a release *beep* *boop*
---


## [7.6.2](v7.6.1...v7.6.2)
(2024-05-09)

### Bug Fixes

*
[`6466ba9`](6466ba9)
[#713](#713) lru: use
map.delete() directly (#713) (@negezor, @lukekarrys)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mbtools
Copy link
Contributor

mbtools commented May 9, 2024

Thanks for the optimization 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants