New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pre-visit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pre-visit

Fully typed utility to visit trees and apply a visitor before visiting other nodes

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

pre-visit

Utility function to visit all or some nodes of a generic tree, where children of a node are found in the children property. A visitor is applied before visiting the children and siblings, hence it is calle pre-visit.

Besides a visitor you can provide a predicate to filter nodes.

It works fine with all kinds of trees, I use it mainly as a typed and more feature rich replacement to unist-util-visit to visit remark trees.

Content

  • Content
  • What is this?
  • When should I use this?
  • Install
  • Use

What is this?

This package provides a fully typed utility to visit trees and apply a visitor before visiting other nodes.

When should I use this?

If you want to work with trees and even be able to transform them, while visiting.

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:

npm install pre-visit

Use

This is still in very early alpha, hence, I can only provide very little documentation.

Use at your own risk.

Keywords

tree

FAQs

Package last updated on 14 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts