Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

dom-dfs

1.0.4 • Public • Published

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.

Install

npm i dom-dfs

DownloadsWeekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • avatar