Unist Utility: Find All Nodes Before
JSON →unist-util-find-all-before is a specialized utility within the unified ecosystem, designed to locate all nodes that appear before a specific child node or a given index within a parent node. It offers an optional `test` function, compatible with `unist-util-is`, to filter the results based on node properties. The current stable version is 5.0.0, which is ESM-only and requires Node.js 16 or newer. This package follows semver for its releases, with frequent updates addressing bug fixes, performance improvements, and keeping pace with Node.js and TypeScript advancements. Its key differentiator lies in its focused functionality for collecting multiple preceding nodes, making it a complementary tool for more general tree traversal utilities like `unist-util-visit` when precise positional node discovery is needed.
Traffic · last 30 days ↓12% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France