Preparing for system design interviews?  Try bugzed.com →

Unist Utility to Filter Nodes

JSON →
library 5.0.1 ·javascript
verified Jun 17, 2026

unist-util-filter is a utility for the Unist ecosystem that creates a new, immutable tree containing only the nodes that pass a provided test function. Unlike `unist-util-remove`, which modifies the original tree in place, `unist-util-filter` ensures immutability, making it suitable for functional programming paradigms or scenarios where the original tree must be preserved. The current stable version is 5.0.1. Major releases are not on a fixed cadence but often coincide with updates to Node.js LTS lines and significant changes in TypeScript definitions or module resolution. It integrates seamlessly with `unist-util-is` for defining complex testing conditions and offers a `cascade` option to control whether parent nodes should be removed if all their children are filtered out, with `true` as the default. This utility provides a clean, predictable way to prune ASTs without side effects.

total hits 12
actors 4 distinct systems
last hit 16d ago AhrefsBot
GPTBot
4
Amazonbot
3
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany