JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1053
  • Score
    100M100P100Q108293F
  • License Apache-2.0

Utilities for manipulating plain JS objects & maps

Package Exports

  • @thi.ng/object-utils
  • @thi.ng/object-utils/as-object
  • @thi.ng/object-utils/common-keys
  • @thi.ng/object-utils/copy
  • @thi.ng/object-utils/dissoc
  • @thi.ng/object-utils/empty
  • @thi.ng/object-utils/first-non-null
  • @thi.ng/object-utils/from-keys
  • @thi.ng/object-utils/invert
  • @thi.ng/object-utils/merge
  • @thi.ng/object-utils/merge-apply
  • @thi.ng/object-utils/merge-deep
  • @thi.ng/object-utils/merge-with
  • @thi.ng/object-utils/partition-keys
  • @thi.ng/object-utils/rename-keys
  • @thi.ng/object-utils/select-keys
  • @thi.ng/object-utils/sorted-obj
  • @thi.ng/object-utils/without-keys

Readme

@thi.ng/object-utils

npm version npm downloads Mastodon Follow

[!NOTE] This is one of 209 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

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.

Features

  • 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

Status

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

Installation

yarn add @thi.ng/object-utils

ESM import:

import * as ou from "@thi.ng/object-utils";

Browser ESM import:

<script type="module" src="https://esm.run/@thi.ng/object-utils"></script>

JSDelivr documentation

For Node.js REPL:

const ou = await import("@thi.ng/object-utils");

Package sizes (brotli'd, pre-treeshake): ESM: 1.20 KB

Dependencies

Note: @thi.ng/api is in most cases a type-only import (not used at runtime)

API

Generated API docs

TODO

Authors

If this project contributes to an academic publication, please cite it as:

@misc{thing-object-utils,
  title = "@thi.ng/object-utils",
  author = "Karsten Schmidt",
  note = "https://thi.ng/object-utils",
  year = 2017
}

License

© 2017 - 2025 Karsten Schmidt // Apache License 2.0