---
url: /reference/@cssdoc/index/functions/indexFromEntries.md
---
# Function: indexFromEntries()

```ts
function indexFromEntries(
   entries, 
   file?, 
   globalPrecedence?, 
   matcher?
): CssDocIndex;
```

Defined in: [packages/index/src/index.ts:410](https://github.com/thedannywahl/cssdoc/blob/main/packages/index/src/index.ts#L410)

Build an index from a model snapshot (no source spans). `matcher` defaults to BEM when omitted —
pass the governing scope's own `index.matcher` when merging in provider/sibling entries, so a
non-BEM project's modifier convention (rscss, attribute, …) still applies to the merged index.

## Parameters

### entries

[`CssDocEntry`](../../core/interfaces/CssDocEntry.md)\[]

### file?

`string`

### globalPrecedence?

`"base"` | `"global"`

### matcher?

[`ModifierMatcher`](../../core/classes/ModifierMatcher.md)

## Returns

[`CssDocIndex`](../classes/CssDocIndex.md)
