An open API service indexing awesome lists of open source software.

https://github.com/stevenvachon/walk-parse5

Recursively traverse a parse5 DOM tree.
https://github.com/stevenvachon/walk-parse5

nodejs parse5 traverse walk

Last synced: 3 months ago
JSON representation

Recursively traverse a parse5 DOM tree.

Awesome Lists containing this project

README

        

# walk-parse5 [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]

> Recursively traverse a [parse5](https://npmjs.com/parse5) DOM tree.

## Installation

[Node.js](http://nodejs.org/) `>= 8` is required. To install, type this at the command line:
```shell
npm install walk-parse5
```

## Usage

```js
const walk = require('walk-parse5');

walk(documentOrNode, node => {
// Optionally kill traversal
return false;
});
```

[npm-image]: https://img.shields.io/npm/v/walk-parse5.svg
[npm-url]: https://npmjs.com/package/walk-parse5
[travis-image]: https://img.shields.io/travis/stevenvachon/walk-parse5.svg
[travis-url]: https://travis-ci.org/stevenvachon/walk-parse5