set
Package set provides JavaScript Set-like operations on generic comparable sets.
import "github.com/sahilkhaire/gox/set"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Types
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Set | — | type | Set is a set of comparable values. |
Methods
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Set.Difference | — | method | Difference returns elements in a but not in b. |
| Set.Intersection | — | method | Intersection returns elements in both a and b. |
| Set.New | new Set(arr) | method | New creates a set from items. |
| Set.Union | — | method | Union returns elements in a or b. |