Miss any of our Open RFC calls?Watch the recordings here! »

dom-bfs

1.0.1 • Public • Published

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.

Install

npm i dom-bfs

DownloadsWeekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • avatar