# kolodny/immutability-helper

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kolodny-immutability-helper).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

5,187 stars · 185 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/kolodny/immutability-helper
- awesome-repositories: https://awesome-repositories.com/repository/kolodny-immutability-helper.md

## Description

immutability-helper is an immutable data manipulation library and object utility used for creating modified copies of objects and arrays. It functions as a command-based state manager and functional data transformer that ensures original source data remains unchanged during updates.

The library distinguishes itself by using a declarative set of mutation commands and descriptors to specify changes. It preserves reference equality by returning the original object reference if no actual changes occur during the mutation process.

It provides capabilities for deep cloning nested structures and performing complex state mutations on objects, arrays, maps, and sets. The system supports merging immutable objects and applying custom transformation logic through a pluggable mutation engine.

## Tags

### Software Engineering & Architecture

- [Command-Based Immutable Mutations](https://awesome-repositories.com/f/software-engineering-architecture/command-based-immutable-mutations.md) — Provides a command-based system for creating modified copies of data structures without mutating the original. ([source](https://github.com/kolodny/immutability-helper#readme))
- [Command-Based State Mutation](https://awesome-repositories.com/f/software-engineering-architecture/command-based-state-mutation.md) — Uses a declarative set of mutation commands and descriptors to apply data transformations to the state.
- [Complex State Mutation Commands](https://awesome-repositories.com/f/software-engineering-architecture/complex-state-mutation-commands.md) — Ships built-in commands to perform complex operations like splicing and toggling within immutable structures. ([source](https://github.com/kolodny/immutability-helper/blob/master/README.md))
- [Command Objects](https://awesome-repositories.com/f/software-engineering-architecture/data-structures/domain-type-definitions/command-objects.md) — Uses descriptive command objects to modify deep data structures without requiring manual cloning.
- [Data Transformation Commands](https://awesome-repositories.com/f/software-engineering-architecture/data-structures/domain-type-definitions/command-objects/data-transformation-commands.md) — Implements a declarative command system for specifying modifications to immutable data structures.
- [Immutable Object Merging](https://awesome-repositories.com/f/software-engineering-architecture/non-destructive-editing-workflows/immutable-object-merging.md) — Combines properties from source objects into new immutable copies without altering the original data. ([source](https://github.com/kolodny/immutability-helper/blob/master/test.ts))
- [Reference Equality Preservation](https://awesome-repositories.com/f/software-engineering-architecture/reference-equality-preservation.md) — Returns the original object reference if no actual changes occur, enabling efficient state change detection.
- [Immutable Update Utilities](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/immutable-data-strategies/immutable-update-utilities.md) — Ships a set of utilities for merging, toggling, and updating complex data structures without side effects.
- [Immutable State Copies](https://awesome-repositories.com/f/software-engineering-architecture/state-management/object-state-trackers/immutable-state-copies.md) — Implements patterns for creating modified copies of state objects to ensure immutable updates of complex data structures.
- [Custom Mutation Registries](https://awesome-repositories.com/f/software-engineering-architecture/custom-mutation-registries.md) — Allows registering custom functions that apply domain-specific transformation logic during the update process. ([source](https://github.com/kolodny/immutability-helper/blob/master/README.md))
- [Custom Update Commands](https://awesome-repositories.com/f/software-engineering-architecture/custom-update-commands.md) — Supports registering custom transformation functions to the update engine for specialized data mutation logic. ([source](https://github.com/kolodny/immutability-helper#readme))
- [Function Registries](https://awesome-repositories.com/f/software-engineering-architecture/custom-validation-rules/asynchronous-validators/custom-validation-functions/function-registries.md) — Uses a lookup table to map identifiers to user-defined functions for specialized data transformations.
- [Reference Equality Preservation](https://awesome-repositories.com/f/software-engineering-architecture/dependency-resolution-engines/circular-reference-detection/reference-tracking/reference-equality-preservation.md) — Ensures the original object reference is returned if no changes occur, facilitating efficient change detection.
- [Poly-Type Copying Strategies](https://awesome-repositories.com/f/software-engineering-architecture/poly-type-copying-strategies.md) — Applies different cloning and mutation mechanisms tailored to objects, arrays, maps, and sets.
- [Reference Equality Workflows](https://awesome-repositories.com/f/software-engineering-architecture/reference-equality-workflows.md) — Manages data changes while preserving reference equality and providing a history of unmodified state snapshots.
- [Type-Safe Data Handling](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-data-handling.md) — Handles different data types using a consistent, type-safe approach to ensure correct mutation strategies.

### Data & Databases

- [Immutable Array Updates](https://awesome-repositories.com/f/data-databases/immutable-array-updates.md) — Performs array operations on copies of arrays to avoid mutating the original source data. ([source](https://github.com/kolodny/immutability-helper/blob/master/test.ts))
- [Immutable Element Updates](https://awesome-repositories.com/f/data-databases/immutable-array-updates/array-element-modifiers/immutable-element-updates.md) — Updates data structures using a command-based syntax that returns new copies to preserve immutability. ([source](https://github.com/kolodny/immutability-helper/blob/master/README.md))
- [JSON Object Deep Cloning](https://awesome-repositories.com/f/data-databases/json-object-deep-cloning.md) — Creates deep copies of nested structures to ensure mutations do not affect original source references.
- [Mutation Engines](https://awesome-repositories.com/f/data-databases/data-compression-algorithms/pluggable-architectures/mutation-engines.md) — Provides a pluggable engine that allows registering custom functions to handle specific data keys during updates.

### DevOps & Infrastructure

- [Immutable Value Transformers](https://awesome-repositories.com/f/devops-infrastructure/function-as-a-service-platforms/map-value-updaters/immutable-value-transformers.md) — Executes user-defined functions on specific values to produce new immutable versions of the data structure. ([source](https://github.com/kolodny/immutability-helper/blob/master/README.md))

### Programming Languages & Runtimes

- [Structure-Preserving Transformations](https://awesome-repositories.com/f/programming-languages-runtimes/collection-data-structures/structure-preserving-transformations.md) — Applies mutation commands and custom logic to transform data while strictly preserving the original state.
- [Functional Transformations](https://awesome-repositories.com/f/programming-languages-runtimes/functional-transformations.md) — Applies custom transformation logic using pure functions to produce new immutable states from data structures.
- [Immutable Data Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/immutable-data-libraries.md) — Serves as a general-purpose library for creating modified copies of objects and arrays while ensuring original data remains unchanged.
- [Deep Copying Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/object-cloning-techniques/deep-copying-libraries.md) — Provides utilities for producing recursive deep copies of nested structures to prevent side effects during modification.
- [Immutable Data Structures](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/specialized-memory-formats/immutable-data-structures.md) — Ensures the original data remains unmodified by creating copies of objects, arrays, maps, or sets. ([source](https://github.com/kolodny/immutability-helper/blob/master/index.ts))

### Web Development

- [Mutation Mappers](https://awesome-repositories.com/f/web-development/graphql-extensions/mutation-mappers.md) — Maps specific data keys to specialized transformation functions through a custom command registry. ([source](https://github.com/kolodny/immutability-helper/blob/master/index.ts))
