arr-union
Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
This package has a good security score with no known vulnerabilities.
Community Reviews
Overly simplistic utility best replaced by native ES6 features
The real issue is that modern JavaScript makes this package obsolete. `[...new Set([...arr1, ...arr2])]` accomplishes the same thing with no dependencies, better performance for most use cases, and full IDE support. The package hasn't been updated since 2016, predating widespread ES6 adoption, which explains its existence but questions its relevance today.
Error handling is minimal—passing non-arrays can lead to cryptic runtime errors rather than helpful messages. Documentation is sparse, though admittedly there's not much to document. For a dependency that adds 1.2KB and solves a problem native JavaScript handles elegantly, the maintenance burden and lack of types make it hard to justify in modern codebases.
Best for: Legacy projects already using it where removing dependencies isn't worth the effort.
Avoid if: You're starting a new project or can use ES6+ features, which solve this problem natively.
Minimalist utility abandoned since 2016 with no security updates
The package hasn't been updated since 2016, which is a significant supply chain concern. While the code itself is minimal and unlikely to contain exploitable vulnerabilities, the lack of maintenance means no CVE monitoring, no dependency updates, and no modern JavaScript improvements. The author has abandoned hundreds of micro-packages like this, creating potential orphaned dependency risk.
From a practical standpoint, you're better off using native ES6+ methods like `[...new Set([].concat(...arrays))]` or a maintained utility library. The security posture is weak not because of malicious code, but because of abandonment and the general micro-package ecosystem risks this represents.
Best for: Legacy codebases already using it where removing dependencies isn't prioritized.
Avoid if: You're starting new projects or care about dependency maintenance and supply chain security.
Overly simplistic utility with better native alternatives available
The learning curve is non-existent because the API is just a function call, but that's where the positives end. There's virtually no community support; Stack Overflow has almost no questions about it, and GitHub issues sat unanswered for years before the repo was archived. Error messages are JavaScript's native errors since there's no input validation—pass non-arrays and you'll get cryptic failures.
In practice, using the ES6 spread operator with Set (`[...new Set([...arr1, ...arr2])]`) or lodash's union gives you the same result with better maintenance, TypeScript support, and community backing. The package adds an unnecessary dependency for something trivially implemented natively.
Best for: Legacy codebases already using it where removing dependencies isn't worth the effort.
Avoid if: You're starting a new project or have access to ES6+ features, where native alternatives are superior.
Sign in to write a review
Sign In