Skip to content

Improve some Array.from() usage - #21742

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:more-Array-from-mapFn
Aug 10, 2026
Merged

Improve some Array.from() usage#21742
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:more-Array-from-mapFn

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Rather than doing Array.from(...).map(mapFn) we can use the more efficient Array.from(..., mapFn) format instead since that avoids creating an intermediate Array; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#description

Rather than doing `Array.from(...).map(mapFn)` we can use the more efficient `Array.from(..., mapFn)` format instead since that avoids creating an intermediate Array; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#description
@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.09%. Comparing base (c2bbde1) to head (1c6cead).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21742   +/-   ##
=======================================
  Coverage   90.09%   90.09%           
=======================================
  Files         264      264           
  Lines       67194    67234   +40     
=======================================
+ Hits        60538    60577   +39     
- Misses       6656     6657    +1     
Flag Coverage Δ
browsertest 66.35% <ø> (-0.04%) ⬇️
integrationtest 69.30% <ø> (+0.01%) ⬆️
unittest 58.22% <ø> (-0.04%) ⬇️
unittestcli 56.58% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timvandermeij
timvandermeij merged commit 97b45e4 into mozilla:master Aug 10, 2026
16 of 17 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Thanks!

@Snuffleupagus
Snuffleupagus deleted the more-Array-from-mapFn branch August 10, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants