uniqs
Tiny utility to create unions and de-duplicated lists.
Example:
You can pass multiple lists to create a union:
Passing individual items works too:
Summary
Uniqueness is defined based on strict object equality.
The lists do not need to be sorted.
The resulting array contains the items in the order of their first appearance.
About
This package has been written to accompany utilities like flatten as alternative to full-blown libraries like underscore or lodash.
The implementation is optimized for simplicity rather than performance and looks like this:
License
MIT
Last updated