Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Mar 8, 2023
1 parent 87f68ab commit 81377fc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const selector = finder(event.target, {

Minimum length of levels in fining selector. Starts from `1`.
For more robust selectors give this param value around 4-5 depending on depth of
you DOM tree. If `finder` hits `root` this param is ignored.
you DOM tree. If finder hits the `root`, this param is ignored.

### optimizedMinLength

Expand All @@ -68,14 +68,13 @@ For example selector `body > div > div > p` can be optimised to `body p`.
### threshold

Max number of selectors to check before falling into `nth-child` usage.
Checking for uniqueness of selector is very costs operation, if you have DOM
Checking for uniqueness of selector is very costly operation, if you have DOM
tree depth of 5, with 5 classes on each level, that gives you more than 3k
selectors to check. Finder uses two-step approach,Ï so it's reaching this
threshold in some cases twice. Default `1000` is good enough in most cases.
selectors to check. Default `1000` is good enough in most cases.

### maxNumberOfTries

Max number of tries when we do the optimization. It is a trade-off between
Max number of tries for the optimization. This is a trade-off between
optimization and efficiency. Default `10_000` is good enough in most cases.

## License
Expand Down

0 comments on commit 81377fc

Please sign in to comment.