Collects a set of unique MongoDB documents.

Constructor

Set ( ) {

Arguments

Instance Methods

add ( ) {

Add a value to this Set and return whether or not the value was previously unknown.

Arguments

value

@returns/Boolean true if the item was added, false if it was already there.

, | Boolean contains ( ) {

Determine whether every value in another Set is also contained in this Set.

Arguments

Returns

difference ( ) {

Remove another Set's values from this Set.

Arguments

, | Boolean equals ( ) {

Determine whether this Set contains the exact same collection of values as another Set.

Arguments

Returns

, | Array export ( ) {

Create an Array of every value stored in this Set.

Returns

| Array

An Array of unique elements in this Set.

, | fauxmongo.Set.Set intersect ( ) {

Create a new Set containing only values which appear in both this Set and another Set.

Arguments

Returns

union ( ) {

Add another Set's values to this Set.

Arguments