uniqs
Last updated
Last updated
Example:
You can pass multiple lists to create a union:
Passing individual items works too:
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.
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:
MIT