Skip to content

Easily perform a breadth-first-search through DOM elements

Notifications You must be signed in to change notification settings

Robinfr/dom-bfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOM Breadth-first-search

Allows you to easily perform a breadth-first-search (BFS) through DOM elements.

Installation

Run the following command to install:

npm install dom-bfs --save

Usage

First import:

import domBFS from 'dom-bfs';

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

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

TypeScript typings

TypeScript typings are included in the project.

About

Easily perform a breadth-first-search through DOM elements

Topics

Resources

Stars

Watchers

Forks

Packages