Unist Utility to Find a Node Before Another

JSON →
library 4.0.1 ·javascript
verified May 27, 2026

unist-util-find-before is a specialized utility within the unified ecosystem designed to locate the first node that appears before a specified node or index within a parent node's children. It's currently at version 4.0.1 and follows the unified collective's release cadence, typically aligning major releases with Node.js LTS versions and dropping support for unmaintained Node.js versions. While the core functionality of iterating and finding a node could be implemented manually, this package provides a robust, well-tested, and type-safe solution that integrates seamlessly with other `unist` utilities, promoting consistency and reducing boilerplate when working with abstract syntax trees (ASTs). Its key differentiators include its small size, strong TypeScript support, and adherence to the unified project's compatibility standards, making it a reliable choice for AST manipulation tasks where precise node location is required.

total hits 10
actors 4 distinct systems
last hit 7d ago Script
GPTBot
5
Script
1
Search engines
1

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