views:

220

answers:

1

Since Javascript doesn't have a built in set datatype has anyone come across a decent library for sets and set operations like union, intersection, etc?

+8  A: 

Have a look at JS.Set.

The JS.Set class can be used to model collections of unique objects. A set makes sure that there are no duplicates among its members, and it allows you to use custom equality methods for comparison as well as JavaScript’s === operator.

It contains methods like union, intersection, merge, etc ...

Sagi