1.0.4 • Published 6 years ago

dom-dfs v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

DOM Depth-first-search

Allows you to easily perform a depth-first-search (DFS) through DOM elements.

Installation

Run the following command to install:

npm install dom-dfs --save

Usage

First import:

import domDFS from 'dom-dfs';

And then supply the initial DOM element and the condition for when a DOM element should be returned:

domDFS(startingElement, element => element.className === 'orange');

TypeScript typings

TypeScript typings are included in the project.

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago