> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# array-repeated-find

> An array is searched with find or findIndex repeatedly where a Map lookup would do.

## What it flags

Repeated linear lookups or rebuilt indexes.

When the lookup array and the iteration input are separate parameters of the same function, a configuration-like name does not by itself make the lookup contextual.

A route lookup receives contextual advice when an unchanged `routeStrategies` or `strategiesForRoute` list selects a keyed entry from a same-file `const strategies = {}` registry in a conditional with an empty-array fallback. The registry can grow through registrations, so review workloads where it does. Parameters, database reads, and opaque factories do not receive this classification.

## How to review or fix

Reuse a Set or Map if inputs are stable and enough lookups justify construction. Preserve first-match semantics with duplicate keys.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "array-repeated-find": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.