Skip to content
Node: Set5 APIs

set

Package set provides JavaScript Set-like operations on generic comparable sets.

import "github.com/sahilkhaire/gox/set"
## API reference

Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.

Types ​

SymbolNode.jsKindSummary
Set—typeSet is a set of comparable values.

Methods ​

SymbolNode.jsKindSummary
Set.Difference—methodDifference returns elements in a but not in b.
Set.Intersection—methodIntersection returns elements in both a and b.
Set.Newnew Set(arr)methodNew creates a set from items.
Set.Union—methodUnion returns elements in a or b.

MIT Licensed · Built for Node.js developers moving to Go