Skip to content

Conversation

@Richienb
Copy link
Contributor

@Richienb Richienb commented Jul 20, 2025

Maybe time to seperate into different module

Other considerations are whether to throw an AggregateError if there is only one item, and what to do if there are none.

@sindresorhus
Copy link
Owner

Maybe time to seperate into different module

Not sure it makes sense. It's so simple even I would just inline it.

@sindresorhus
Copy link
Owner

Other considerations are whether to throw an AggregateError if there is only one item, and what to do if there are none.

Better with consistency, so always AggregateError. We should add empty array check and just return early.

@sindresorhus sindresorhus merged commit 2778ac6 into sindresorhus:main Jul 20, 2025
3 checks passed
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.

2 participants