Skip to content
Node: lodash object utils9 APIs

maputil

Package maputil provides lodash-style object helpers for maps.

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

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

Functions

SymbolNode.jsKindSummary
Clone_.cloneDeep(obj)funcClone returns a shallow copy of m (lodash clone).
Get_.get(obj, "a.b")funcGet reads a nested value from m using dot-separated path (lodash get).
Invert_.invert(obj)funcInvert swaps keys and values; duplicate values overwrite (lodash invert).
KeysObject.keys(obj)funcKeys returns map keys (Object.keys).
Merge_.merge(a, b)funcMerge copies keys from sources into dst, later maps override (lodash merge, shallow).
Omit_.omit(obj, keys)funcOmit returns a new map without the given keys (lodash omit).
Pick_.pick(obj, keys)funcPick returns a new map with only the given keys (lodash pick).
Set_.set(obj, "a.b", v)funcSet writes value at dot-separated path, creating intermediate maps (lodash set).
ValuesObject.values(obj)funcValues returns map values (Object.values).

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