{"library":"unist-util-map","type":"library","category":null,"description":"unist-util-map is a utility for the Unist syntax tree ecosystem designed to create a *new* Unist tree by applying a mapping function to every node. Unlike many tree manipulation utilities that mutate the tree in place, `unist-util-map` always returns a completely new, transformed tree, preserving the original structure. The package is currently at version 4.0.0, with a release cadence that includes minor patch updates for bug fixes, documentation improvements, and internal refactors. Major versions are released less frequently, typically when significant breaking changes occur, such as updates to required Node.js versions or shifts to modern module systems. A key differentiator and important consideration for developers is its tree-cloning behavior; while excellent for immutable transformations, this approach can lead to performance overhead on exceptionally large trees. For scenarios involving potentially large trees and relatively few modifications, developers are often advised to consider alternatives like `unist-util-visit` or `unist-util-filter`, which offer different performance characteristics depending on the use case.","language":"javascript","status":"active","version":"4.0.0","tags":["javascript","unist","unist-util","util","utility","node","tree","map","walk","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install unist-util-map","imports":["import { map } from 'unist-util-map'","import type { MapFunction } from 'unist-util-map'","import { map } from 'unist-util-map';\n\nconst myMapFn: (node: Node, index?: number, parent?: Node) => Node = (node) => {\n  // ... return new node\n};"]},{"cmd":"yarn add unist-util-map","imports":[]},{"cmd":"pnpm add unist-util-map","imports":[]}],"homepage":null,"github":"https://github.com/syntax-tree/unist-util-map","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/unist-util-map","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/unist-util-map/compatibility"}}