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

explicit-length-check: Check Set#size #1226

Merged
merged 2 commits into from
Apr 28, 2021

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Apr 28, 2021

Fixes #958

@sindresorhus
Copy link
Owner

You need to update the readme too.

@sindresorhus sindresorhus merged commit 6a745a0 into sindresorhus:main Apr 28, 2021
@fisker fisker deleted the explicit-length-check-size branch April 28, 2021 07:41
@wooorm
Copy link
Sponsor

wooorm commented May 9, 2021

I just now ran into this being incorrect. I have an arbitrary object with a size field.

Maybe I’m alone but I think size is a bit more common for other things, compared to length?

@fisker
Copy link
Collaborator Author

fisker commented May 10, 2021

@wooorm It seems size is a required number field, and you are checking existence? I think better use Reflect.has in your case.

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.

explicit-length-check: Check Set#size
3 participants