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

refactor(fs): use every instead of reduce #5323

Merged
merged 1 commit into from
May 15, 2020

Conversation

LinusU
Copy link
Contributor

@LinusU LinusU commented May 14, 2020

The previous usage of reduce was basically implementing the every function. A small difference is that the new implementation will stop checking as soon as one element have returned false, which will reduce the number of unnecessary checks.

@CLAassistant
Copy link

CLAassistant commented May 14, 2020

CLA assistant check
All committers have signed the CLA.

The previous usage of `reduce` was basically implementing the [`every` function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every). A small difference is that the new implementation will stop checking as soon as one element have returned false, which will reduce the number of unnecessary checks.
@LinusU
Copy link
Contributor Author

LinusU commented May 14, 2020

(force pushed to fix formatting 😬)

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 8228ea8 into denoland:master May 15, 2020
@LinusU LinusU deleted the patch-1 branch May 18, 2020 09:28
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
The previous usage of `reduce` was basically implementing the `every`

A small difference is that the new implementation will stop checking 
as soon as one element have returned false, which will reduce 
the number of unnecessary checks.
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.

6 participants