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
SettypeSet is a set of comparable values.

Methods

SymbolNode.jsKindSummary
Set.DifferencemethodDifference returns elements in a but not in b.
Set.IntersectionmethodIntersection returns elements in both a and b.
Set.Newnew Set(arr)methodNew creates a set from items.
Set.UnionmethodUnion returns elements in a or b.

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