# Feature catalog — immerjs/immer

> Canonical page: https://codevetter.com/unpack/immer/feature-catalog

# Feature catalog — immerjs/immer

Scanned commit 061c2425e1c9dff89e4e4189d42af1b7839dfe0a (2026-08-19). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The user-facing surface is primarily a library API for creating and examining immutable updates. Recipes support direct and curried calls, explicit replacement, manual draft lifecycles, and optional reversible patches. Collection support, class draftability, type helpers, configurable copying, and array interception extend that surface, while the website explains their usage.
- produce accepts a base value and recipe, validates callback arguments, drafts eligible objects, handles primitive inputs directly, and returns either the resulting state or a replacement. — [src/core/immerClass.ts#L99-L135](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/immerClass.ts#L99-L135) [src/core/finalize.ts#L27-L60](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/finalize.ts#L27-L60)
- Curried produce captures a recipe and optional default base, then forwards later arguments and the caller's this context into recipe.call. — [src/core/immerClass.ts#L83-L96](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/immerClass.ts#L83-L96)
- enablePatches activates produce listeners, produceWithPatches tuples, and applyPatches replay; Patch exposes add, remove, and replace operations with array-valued paths. — [src/immer.ts#L81-L86](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/immer.ts#L81-L86) [src/immer.ts#L121-L123](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/immer.ts#L121-L123) [src/core/immerClass.ts#L137-L150](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/immerClass.ts#L137-L150) [src/types/types-external.ts#L88-L94](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/types/types-external.ts#L88-L94)
- createDraft opens a mutable draft without a recipe callback, and finishDraft finalizes only drafts marked manual, optionally reporting patches. — [src/core/immerClass.ts#L152-L170](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/immerClass.ts#L152-L170) [website/docs/async.mdx#L36-L59](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/website/docs/async.mdx#L36-L59)
- enableMapSet supplies DraftMap and DraftSet implementations with mutation methods, iteration, nested value drafting, and revocation checks. — [src/plugins/mapset.ts#L34-L75](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/plugins/mapset.ts#L34-L75) [src/plugins/mapset.ts#L117-L172](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/plugins/mapset.ts#L117-L172) [src/plugins/mapset.ts#L244-L303](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/plugins/mapset.ts#L244-L303)
- enableArrayMethods intercepts seven mutating methods and selected read methods; filter, slice, find, and findLast return selected drafts, while concat and flat return base elements. — [src/plugins/arrayMethods.ts#L100-L156](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/plugins/arrayMethods.ts#L100-L156) [src/plugins/arrayMethods.ts#L440-L500](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/plugins/arrayMethods.ts#L440-L500)
- isDraft, isDraftable, original, and current inspect draft state; immerable marks custom instances or constructors as draftable, and nothing requests an undefined replacement. — [src/utils/common.ts#L27-L43](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/utils/common.ts#L27-L43) [src/utils/common.ts#L67-L73](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/utils/common.ts#L67-L73) [src/core/current.ts#L14-L18](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/current.ts#L14-L18) [src/utils/env.ts#L3-L18](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/utils/env.ts#L3-L18)
- Configuration APIs control auto-freezing, strict shallow copying, and strict iteration; Draft and Immutable recursively map types, while castDraft and castImmutable are runtime identity casts. — [src/core/immerClass.ts#L178-L202](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/core/immerClass.ts#L178-L202) [src/types/types-external.ts#L31-L85](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/types/types-external.ts#L31-L85) [src/immer.ts#L104-L117](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/src/immer.ts#L104-L117)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
