Skip to content

feat(micro-utilities): add array-equal to replacements - #1261

Merged
43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/array-equal
Nov 20, 2026
Merged

43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/array-equal

Conversation

@maksimgm

Copy link
Copy Markdown
Contributor

🔗 Linked issue

closes #1190

📚 Description

adds array-equal (~2.5M weekly downloads) to micro-utilities with a new snippet::array-shallow-equal, the one-liner from the issue:

const arraysEqual = (a, b) => a === b || (a.length === b.length && a.every((value, i) => value === b[i]))

checked against array-equal@1.0.2 and @2.0.0 (and 1.0.0) with equal/unequal/different-length arrays, shared and separate objects, 0/-0 and NaN, same results. only difference is sparse arrays: every skips holes, so [, 1] and [2, 1] compare equal

@43081j
43081j merged commit 0b3c30d into e18e:main Nov 20, 2026
5 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.

[Replacement]: array-equal

2 participants