Skip to content

Use reduce() method to get the total size of Uint8Arrays #39374

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

def00111
Copy link
Contributor

@def00111 def00111 commented May 3, 2025

Description

Use reduce() method to get the total size of Uint8Arrays instead of using for...of loop.

Motivation

Replace 4 lines of code with 1 line.

Additional details

Related issues and pull requests

@def00111 def00111 requested a review from a team as a code owner May 3, 2025 13:17
@def00111 def00111 requested review from rebloor and removed request for a team May 3, 2025 13:17
@github-actions github-actions bot added Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed labels May 3, 2025
Copy link
Contributor

github-actions bot commented May 3, 2025

@rebloor rebloor requested a review from dotproto May 26, 2025 17:44
@rebloor rebloor merged commit 697e5e3 into mdn:main May 28, 2025
7 checks passed
@rebloor
Copy link
Contributor

rebloor commented May 28, 2025

Thanks @def00111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants