Utilities for manipulating plain JS objects & maps
npm install @thi.ng/object-utils
!npm downloads

> [!NOTE]
> This is one of 214 standalone projects, maintained as part
> of the @thi.ng/umbrella monorepo
> and anti-framework.
>
> 🚀 Please help me to work full-time on these projects by sponsoring me on
> GitHub. Thank you! ❤️
- About
- Features
- Status
- Related packages
- Installation
- Dependencies
- API
- Authors
- License
Utilities for manipulating plain JS objects & maps.
This package contains functionality which was previously part of and has been
extracted from the @thi.ng/associative package.
- Key-value pair inversion for maps and vanilla objects, i.e. swaps K => V to V => K
- Single or multi-property index generation for maps and objects
- Key selection, renaming, segmenting, splitting, transformations for maps and
objects
- Deep-merging (destructively & non-destructively) of objects/maps
STABLE - used in production
Search or submit any issues for this package
- @thi.ng/associative - ES Map/Set-compatible implementations with customizable equality semantics & supporting operations
``bash`
yarn add @thi.ng/object-utils
ESM import:
`ts`
import * as ou from "@thi.ng/object-utils";
Browser ESM import:
`html`
For Node.js REPL:
`js`
const ou = await import("@thi.ng/object-utils");
Package sizes (brotli'd, pre-treeshake): ESM: 1.21 KB
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
TODO
If this project contributes to an academic publication, please cite it as:
`bibtex``
@misc{thing-object-utils,
title = "@thi.ng/object-utils",
author = "Karsten Schmidt",
note = "https://thi.ng/object-utils",
year = 2017
}
© 2017 - 2026 Karsten Schmidt // Apache License 2.0